Browser extension for Firefox and Chrome that provides the currently watched channel and information about the browser's position to the Chatterino 2 Twitch.tv chat client.
- Replace Twitch's native chat with Chatterino (Windows only).
- Provide the currently watched channel for display in the "watching" split.
Since this extension doesn't have a build step, you can load the extension directly in your browser.
On Firefox, go to the about:debugging
page, click on This Firefox
, click on Load Temporary Add-on...
and select the manifest.json
from the src
folder.
On Chrome, go to chrome://extensions
, enable Developer mode
in the top right, click on Load unpacked
and select the src
folder from this repository.
We use prettier
to format the code files. Run pnpm format
to format all files.
This extension uses native messageing to communicate with Chatterino.
Messages are encoded as JSON in the following structure:
type NativeMessage =
| {
action: 'select';
type: 'twitch';
/** If chatterino should attach an instance to the browser */
attach: boolean;
attach_fullscreen: boolean;
/** Name of the Twitch channel */
name: string;
// The following properties are only used on Windows
winId: string;
yOffset: number;
size: {
x: number;
pixelRatio: number;
width: number;
height: number;
};
}
| {
action: 'detach';
winId: number;
};