├── .editorconfig
├── .github
└── workflows
│ └── main.yml
├── .gitignore
├── LICENSE
├── README.md
├── build.js
├── main.js
├── manifest.json
├── overlay.js
├── package-lock.json
├── package.json
├── resources
├── icon-128.jpg
├── icon-16.jpg
├── icon-48.jpg
└── icon-96.jpg
└── style.css
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | indent_style = space
5 | indent_size = 2
6 | charset = utf-8
7 | trim_trailing_whitespace = true
8 | insert_final_newline = true
9 |
--------------------------------------------------------------------------------
/.github/workflows/main.yml:
--------------------------------------------------------------------------------
1 | name: Build and Publish
2 | on:
3 | push:
4 | branches:
5 | - release
6 | jobs:
7 | build:
8 | runs-on: ubuntu-latest
9 | steps:
10 | - uses: actions/checkout@v2
11 | - uses: actions/setup-node@v1
12 | with:
13 | node-version: "13.x"
14 | - run: npm install
15 | - run: npm run build
16 | - uses: actions/upload-artifact@v1
17 | with:
18 | name: twitch-chat-overlay.zip
19 | path: build/twitch-chat-overlay.zip
20 | publish:
21 | runs-on: ubuntu-latest
22 | needs: build
23 | steps:
24 | - uses: actions/download-artifact@v1
25 | with:
26 | name: twitch-chat-overlay.zip
27 | - uses: trmcnvn/firefox-addon@v1
28 | with:
29 | uuid: "{7b312f5e-9680-436b-acc1-9b09f60e8aaa}"
30 | xpi: twitch-chat-overlay.zip
31 | manifest: "manifest.json"
32 | api-key: ${{ secrets.FIREFOX_API_KEY }}
33 | api-secret: ${{ secrets.FIREFOX_API_SECRET }}
34 | continue-on-error: true
35 | - uses: trmcnvn/chrome-addon@master
36 | with:
37 | extension: lcljofkmbcdnjekeamikmefcjohmhgng
38 | zip: twitch-chat-overlay.zip
39 | client-id: ${{ secrets.CHROME_CLIENT_ID }}
40 | client-secret: ${{ secrets.CHROME_CLIENT_SECRET }}
41 | refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }}
42 | continue-on-error: true
43 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.zip
2 | build/
3 | node_modules/
4 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright © 2019 Thomas McNiven
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4 |
5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6 |
7 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## Twitch Chat Overlay
2 |
3 | Firefox and Chrome Add-on for Twitch that will overlay the chat window while watching a stream in fullscreen.
4 |
5 | #### Features
6 |
7 | - Opacity when the chat isn't focused
8 | - Movable and Resizable (Both are saved for future sessions)
9 |
10 | #### Install
11 |
12 | - Firefox: [https://addons.mozilla.org/en-US/firefox/addon/twitch-chat-overlay/](https://addons.mozilla.org/en-US/firefox/addon/twitch-chat-overlay/)
13 | - Chrome: [https://chrome.google.com/webstore/detail/lcljofkmbcdnjekeamikmefcjohmhgng](https://chrome.google.com/webstore/detail/lcljofkmbcdnjekeamikmefcjohmhgng)
14 |
15 | #### Screenshot
16 |
17 | 
18 |
19 | #### License
20 |
21 | Copyright © 2019 Thomas McNiven
22 |
23 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
24 |
25 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
26 |
27 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 |
--------------------------------------------------------------------------------
/build.js:
--------------------------------------------------------------------------------
1 | const JSZip = require('node-zip');
2 | const fs = require('fs');
3 |
4 | const FILES = [
5 | 'manifest.json',
6 | 'main.js',
7 | 'overlay.js',
8 | 'style.css',
9 | 'resources/icon-16.jpg',
10 | 'resources/icon-48.jpg',
11 | 'resources/icon-96.jpg',
12 | 'resources/icon-128.jpg'
13 | ];
14 |
15 | function run() {
16 | try {
17 | console.log('🔥 starting build...');
18 | if (!fs.existsSync('build')) {
19 | fs.mkdirSync('build');
20 | }
21 | const zip = new JSZip();
22 | for (const file of FILES) {
23 | zip.file(file, fs.readFileSync(file));
24 | }
25 | const data = zip.generate({ type: 'nodebuffer' });
26 | fs.writeFileSync('build/twitch-chat-overlay.zip', data);
27 | console.log('🚀 build finished');
28 | } catch (error) {
29 | console.error(error.message);
30 | }
31 | }
32 |
33 | run();
34 |
--------------------------------------------------------------------------------
/main.js:
--------------------------------------------------------------------------------
1 | // TODO(#1): Setting to allow keybinding to toggle chat overlay
2 | // TODO(#6): Handle embedding VOD chat when watching VODs
3 |
4 | // Inject the actual code into the page as this allows us to
5 | // access the React instance on Twitch
6 | var element = document.createElement("script");
7 | element.src = chrome.runtime.getURL("overlay.js");
8 | document.body.appendChild(element);
9 |
--------------------------------------------------------------------------------
/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "manifest_version": 2,
3 | "name": "Twitch Chat Overlay",
4 | "description": "Overlay the Twitch chat when in fullscreen mode.",
5 | "version": "1.10",
6 | "homepage_url": "https://github.com/trmcnvn/twitch-chat-overlay",
7 |
8 | "icons": {
9 | "16": "resources/icon-16.jpg",
10 | "48": "resources/icon-48.jpg",
11 | "96": "resources/icon-96.jpg",
12 | "128": "resources/icon-128.jpg"
13 | },
14 |
15 | "web_accessible_resources": ["overlay.js"],
16 | "content_scripts": [
17 | {
18 | "matches": ["*://*.twitch.tv/*"],
19 | "js": ["main.js"],
20 | "css": ["style.css"],
21 | "run_at": "document_idle"
22 | }
23 | ]
24 | }
25 |
--------------------------------------------------------------------------------
/overlay.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | const OVERLAY_ID = "tco-ext-element";
3 | const OVERLAY_TITLEBAR_ID = "tco-ext-element-titlebar";
4 | const OVERLAY_BUTTON_ID = "tco-ext-element-button";
5 | const STORAGE_KEY = "tco-ext:settings";
6 | const SVG_INNER =
7 | '';
8 |
9 | // Utilities
10 | const utils = {
11 | writeToStorage(key, value) {
12 | const data = window.localStorage.getItem(STORAGE_KEY);
13 | const json = JSON.parse(data);
14 | window.localStorage.setItem(
15 | STORAGE_KEY,
16 | JSON.stringify({ ...(json || {}), [key]: value })
17 | );
18 | },
19 |
20 | getFromStorage(key) {
21 | const data = window.localStorage.getItem(STORAGE_KEY);
22 | if (data !== null) {
23 | const json = JSON.parse(data);
24 | return json[key] || null;
25 | }
26 | return null;
27 | },
28 |
29 | styleToObject(style) {
30 | const styles = style.split(/; ?/).filter(str => str.length > 0);
31 | const result = {};
32 | for (const style of styles) {
33 | const [key, value] = style.split(/: ?/);
34 | result[key] = value;
35 | }
36 | return result;
37 | },
38 |
39 | objectToStyle(object) {
40 | let style = "";
41 | for (const key in object) {
42 | style += `${key}: ${object[key]};`;
43 | }
44 | return style;
45 | }
46 | };
47 |
48 | const intervalIds = [];
49 | let currentChannel = null;
50 | let isFullscreen = false;
51 |
52 | // Create a mutation observer so we can watch target elements
53 | // for attribute changes and detect when the user has gone into
54 | // fullscreen mode
55 | const observer = new MutationObserver(mutationCallback);
56 | function mutationCallback(mutationsList) {
57 | for (const mutation of mutationsList) {
58 | const element = mutation.target;
59 | if (element.id === OVERLAY_ID) {
60 | const style = element.getAttribute("style");
61 | if (style !== null && style.length > 0) {
62 | const object = utils.styleToObject(style);
63 | utils.writeToStorage("style", object);
64 | }
65 | }
66 | }
67 | }
68 |
69 | let cleanupWindowEvents = null;
70 | function buildTitleBar(parent) {
71 | const element = document.createElement("div");
72 | element.id = OVERLAY_TITLEBAR_ID;
73 |
74 | // Implement dragging of the chat window
75 | let isDragging = false;
76 | let startX, startY, transformX, transformY;
77 |
78 | // RAF function for updating the transform style
79 | function dragUpdate() {
80 | if (isDragging) {
81 | requestAnimationFrame(dragUpdate);
82 | }
83 | // Limit to the boundaries
84 | if (
85 | transformX <= 0 ||
86 | transformX + parent.clientWidth >= window.innerWidth ||
87 | transformY <= 0 ||
88 | transformY + parent.clientHeight >= window.innerHeight
89 | ) {
90 | return;
91 | }
92 | parent.style.transform = `translate(${transformX}px, ${transformY}px)`;
93 | }
94 |
95 | function onMouseDown(event) {
96 | isDragging = true;
97 |
98 | // Set initial transform values based on the position
99 | if (transformX === undefined && transformY === undefined) {
100 | const matches = parent.style.transform.match(/(\d+)px, (\d+)px/);
101 | transformX = matches ? parseFloat(matches[1]) : 0;
102 | transformY = matches ? parseFloat(matches[2]) : 0;
103 | }
104 |
105 | startX = event.pageX - transformX;
106 | startY = event.pageY - transformY;
107 |
108 | window.addEventListener("mousemove", onMouseMove);
109 | window.addEventListener("mouseup", onMouseUp);
110 | requestAnimationFrame(dragUpdate);
111 | }
112 |
113 | function onMouseUp() {
114 | isDragging = false;
115 | window.removeEventListener("mousemove", onMouseMove);
116 | window.removeEventListener("mouseup", onMouseUp);
117 | }
118 |
119 | function onMouseMove(event) {
120 | transformX = event.pageX - startX;
121 | transformY = event.pageY - startY;
122 | }
123 | element.addEventListener("mousedown", onMouseDown);
124 |
125 | // Cleanup these events when we destroy the parent element
126 | cleanupWindowEvents = function() {
127 | window.removeEventListener("mouseup", onMouseUp);
128 | window.removeEventListener("mousemove", onMouseMove);
129 | };
130 |
131 | return element;
132 | }
133 |
134 | // Add button to the player controls that can be used to toggle
135 | // the overlayed chat window
136 | function buildToggleControl(player, parent) {
137 | const element = document.createElement("div");
138 | element.innerHTML = `
139 |
156 | `;
157 | function onClick() {
158 | // Will only be undefined on first run, where settings aren't saved
159 | const state = parent.style.visibility || "visible";
160 | if (state === "visible") {
161 | parent.style.visibility = "hidden";
162 | } else {
163 | parent.style.visibility = "visible";
164 | }
165 | }
166 | element.querySelector("button").addEventListener("click", onClick);
167 |
168 | const target = player.querySelector(
169 | ".player-controls__right-control-group"
170 | );
171 | if (target) {
172 | target.prepend(element);
173 | }
174 | }
175 |
176 | // Create button and popup menu for the user to modify various settings.
177 | function createSettingsMenu(parent, iframe) {
178 | function createButton(target, panel) {
179 | const dom = document.createElement("div");
180 | dom.innerHTML = `
181 |
198 | `;
199 | function toggle() {
200 | if (panel.classList.contains("tw-block")) {
201 | panel.classList.remove("tw-block");
202 | panel.classList.add("tw-hide");
203 | } else {
204 | panel.classList.add("tw-block");
205 | panel.classList.remove("tw-hide");
206 | }
207 | }
208 | dom.querySelector("button").addEventListener("click", toggle);
209 | target.appendChild(dom);
210 | }
211 |
212 | function createPanel(target) {
213 | const panel = document.createElement("div");
214 | panel.className =
215 | "tw-absolute tw-balloon tw-balloon--up tw-pd-2 tw-root--theme-dark tw-c-background-base tw-hide tw-elevation-1 tw-border-b tw-border-l tw-border-r tw-border-radius-medium tw-border-t";
216 | panel.style = "min-width: 200px";
217 | const header = document.createElement("div");
218 | header.className =
219 | "tw-c-background-base tw-c-text-base tw-flex-column tw-full-width tw-inline-flex tw-mg-b-1 tw-c-text-alt-2 tw-upcase";
220 | header.innerText = "Overlay Chat Settings";
221 |
222 | // Opacity setting
223 | // TODO: Conver to slider control
224 | function createOpacityControl() {
225 | let opacity = 70;
226 | const style = utils.getFromStorage("style");
227 | if (style !== null) {
228 | if (style.opacity) {
229 | opacity = Math.floor(Number.parseFloat(style.opacity) * 100);
230 | }
231 | }
232 |
233 | function onMouseLeave() {
234 | parent.style.opacity = opacity / 100;
235 | }
236 | parent.addEventListener("mouseleave", onMouseLeave);
237 |
238 | const btnAddAlpha = document.createElement("button");
239 | btnAddAlpha.innerText = "+";
240 | btnAddAlpha.style =
241 | "padding: 2px 8px;background-color: #9146FF;margin: 1px;";
242 | btnAddAlpha.onclick = function(e) {
243 | e.stopPropagation();
244 | opacity = Math.min(100, opacity + 10);
245 | updateAlphaValue();
246 | };
247 |
248 | const btnMinusAlpha = document.createElement("button");
249 | btnMinusAlpha.innerText = "-";
250 | btnMinusAlpha.style =
251 | "padding: 2px 8px;background-color: #9146FF;margin: 1px;";
252 | btnMinusAlpha.onclick = function(e) {
253 | e.stopPropagation();
254 | opacity = Math.max(10, opacity - 10);
255 | updateAlphaValue();
256 | };
257 |
258 | const alphaValue = document.createElement("span");
259 | alphaValue.style = "flex-grow: 1";
260 |
261 | function updateAlphaValue() {
262 | alphaValue.innerText = `Opacity: ${opacity}%`;
263 | }
264 | updateAlphaValue();
265 |
266 | const alphaSettingsRow = document.createElement("div");
267 | alphaSettingsRow.style = "display: flex";
268 | alphaSettingsRow.appendChild(alphaValue);
269 | alphaSettingsRow.appendChild(btnMinusAlpha);
270 | alphaSettingsRow.appendChild(btnAddAlpha);
271 |
272 | panel.appendChild(alphaSettingsRow);
273 | }
274 |
275 | panel.appendChild(header);
276 | createOpacityControl(panel);
277 | target.children[0].appendChild(panel);
278 | return panel;
279 | }
280 |
281 | // Add the new elements to the DOM
282 | const container = iframe.contentDocument.querySelector(
283 | ".chat-input__buttons-container"
284 | );
285 | const leftChild = container.children[0];
286 | const panel = createPanel(leftChild);
287 | createButton(leftChild, panel);
288 | }
289 |
290 | // Load up the current Twitch chat as an overlay on the stream
291 | function createChatOverlay(target) {
292 | const parent = document.createElement("div");
293 | parent.id = OVERLAY_ID;
294 |
295 | // Set the initial style to the last session
296 | const style = utils.getFromStorage("style");
297 | if (style !== null) {
298 | parent.setAttribute("style", utils.objectToStyle(style));
299 | }
300 |
301 | // Toggle control
302 | buildToggleControl(target, parent);
303 |
304 | // Is this a squad stream? If so, then we need to update the current channel.
305 | // Twitch provides this information via a data attribute so we don't need to hook into
306 | // react at this time.
307 | // NOTE: This could change.
308 | const squadElement =
309 | target.parentNode &&
310 | target.parentNode.parentNode &&
311 | target.parentNode.parentNode.parentNode;
312 | if (
313 | squadElement &&
314 | (squadElement.classList.contains("multi-stream-player-layout__player") ||
315 | squadElement.classList.contains(
316 | "multi-stream-player-layout__player-primary"
317 | ))
318 | ) {
319 | currentChannel = squadElement.dataset["aChannel"];
320 | }
321 |
322 | // Build the embedded element
323 | const child = document.createElement("iframe");
324 | child.src = `https://www.twitch.tv/popout/${currentChannel}/chat?darkpopout`;
325 |
326 | function onLoad() {
327 | createSettingsMenu(parent, child);
328 | onLeave();
329 | }
330 |
331 | function onEnter() {
332 | if (!child.contentDocument) {
333 | return;
334 | }
335 | child.contentDocument.querySelector(".chat-input").style =
336 | "display: block !important";
337 | }
338 |
339 | function onLeave() {
340 | if (!child.contentDocument) {
341 | return;
342 | }
343 | child.contentDocument.querySelector(".chat-input").style =
344 | "display: none !important";
345 | }
346 |
347 | child.addEventListener("load", onLoad);
348 | parent.addEventListener("mouseenter", onEnter);
349 | parent.addEventListener("mouseleave", onLeave);
350 |
351 | // Observe the element for attribute changes, as the `resize` event doesn't fire
352 | // when using CSS resize ???
353 | observer.observe(parent, { attributes: true });
354 |
355 | parent.appendChild(buildTitleBar(parent));
356 | parent.appendChild(child);
357 | target.appendChild(parent);
358 | }
359 |
360 | function destroyChatOverlay() {
361 | // Cleanup associated events on the window object
362 | if (cleanupWindowEvents !== null) {
363 | cleanupWindowEvents();
364 | }
365 |
366 | // Remove the chat overlay element
367 | const element = document.getElementById(OVERLAY_ID);
368 | if (element) {
369 | element.remove();
370 | }
371 |
372 | // Remove the player controls button
373 | const button = document.getElementById(OVERLAY_BUTTON_ID);
374 | if (button) {
375 | button.remove();
376 | }
377 | }
378 |
379 | // Get access to the React instance on Twitch
380 | let cleanupHistoryListener = null;
381 | function hookIntoReact() {
382 | // Watch for navigation changes within the React app
383 | function reactNavigationHook({ history }) {
384 | let lastPathName = history.location.pathname;
385 | cleanupHistoryListener = history.listen(function(location) {
386 | if (location.pathname !== lastPathName) {
387 | lastPathName = location.pathname;
388 | cleanup();
389 | start();
390 | }
391 | });
392 | }
393 |
394 | // Find a property within the React component tree
395 | function findReactProp(node, props, func) {
396 | for (let i = 0; i < props.length; i++) {
397 | const prop = props[i];
398 | if (
399 | node.stateNode &&
400 | node.stateNode.props &&
401 | node.stateNode.props[prop]
402 | ) {
403 | return func(node.stateNode.props);
404 | } else if (node.child) {
405 | let child = node.child;
406 | while (child) {
407 | findReactProp(child, [prop], func);
408 | child = child.sibling;
409 | }
410 | }
411 | }
412 | }
413 |
414 | // Find the react instance of a element
415 | function findReactInstance(elements, target, func) {
416 | const timer = setInterval(function() {
417 | elements.forEach(element => {
418 | const reactRoot = document.querySelector(element);
419 | if (reactRoot) {
420 | let reactInstance = null;
421 | for (const key of Object.keys(reactRoot)) {
422 | if (key.startsWith(target)) {
423 | reactInstance = reactRoot[key];
424 | break;
425 | }
426 | }
427 | if (reactInstance) {
428 | func(reactInstance);
429 | clearInterval(timer);
430 | }
431 | }
432 | });
433 | }, 500);
434 | intervalIds.push(timer);
435 | }
436 |
437 | // Find the root instance and hook into the router history
438 | findReactInstance(["#root"], "_reactRootContainer", function(instance) {
439 | if (instance._internalRoot && instance._internalRoot.current) {
440 | findReactProp(
441 | instance._internalRoot.current,
442 | ["history"],
443 | reactNavigationHook
444 | );
445 | }
446 | });
447 |
448 | // Find the instance related to the video player to find the current stream
449 | const intervalId = setInterval(function() {
450 | findReactInstance(
451 | [".video-player__default-player"],
452 | "__reactInternalInstance$",
453 | function(instance) {
454 | findReactProp(instance, ["channelLogin"], function(object) {
455 | if (object.channelLogin && "isFullscreen" in object) {
456 | currentChannel = object.channelLogin;
457 | if (object.isFullscreen && !isFullscreen) {
458 | isFullscreen = true;
459 | const fsElement = document.querySelector(
460 | ".video-player__overlay"
461 | );
462 | createChatOverlay(fsElement);
463 | } else if (!object.isFullscreen && isFullscreen) {
464 | isFullscreen = false;
465 | destroyChatOverlay();
466 | }
467 | }
468 | });
469 | }
470 | );
471 | }, 1000);
472 | intervalIds.push(intervalId);
473 | }
474 |
475 | function start() {
476 | window.addEventListener("beforeunload", cleanup);
477 | hookIntoReact();
478 | }
479 |
480 | function cleanup() {
481 | window.removeEventListener("beforeunload", cleanup);
482 | destroyChatOverlay();
483 | observer.disconnect();
484 | for (const id of intervalIds) {
485 | clearInterval(id);
486 | }
487 | if (cleanupHistoryListener !== null) {
488 | cleanupHistoryListener();
489 | }
490 | }
491 |
492 | // Convert the legacy storage format
493 | const version = utils.getFromStorage("version");
494 | if (version === null) {
495 | const style = utils.getFromStorage("style");
496 | if (style !== undefined && typeof style === "string") {
497 | const object = utils.styleToObject(style);
498 | utils.writeToStorage("style", object);
499 | utils.writeToStorage("version", 1);
500 | }
501 | }
502 |
503 | // Hello, World!
504 | start();
505 | console.log("Twitch Chat Overlay Extension Loaded");
506 | })();
507 |
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "twitch-chat-overlay",
3 | "version": "1.6.0",
4 | "lockfileVersion": 1,
5 | "requires": true,
6 | "dependencies": {
7 | "jszip": {
8 | "version": "2.5.0",
9 | "resolved": "https://registry.npmjs.org/jszip/-/jszip-2.5.0.tgz",
10 | "integrity": "sha1-dET9hVHd8+XacZj+oMkbyDCMwnQ=",
11 | "requires": {
12 | "pako": "~0.2.5"
13 | }
14 | },
15 | "node-zip": {
16 | "version": "1.1.1",
17 | "resolved": "https://registry.npmjs.org/node-zip/-/node-zip-1.1.1.tgz",
18 | "integrity": "sha1-lNGtZ0o81GoViN1zb0qaeMdX62I=",
19 | "requires": {
20 | "jszip": "2.5.0"
21 | }
22 | },
23 | "pako": {
24 | "version": "0.2.9",
25 | "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz",
26 | "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU="
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "twitch-chat-overlay",
3 | "version": "1.10.0",
4 | "description": "Overlays the Twitch chat while in fullscreen",
5 | "main": "main.js",
6 | "private": true,
7 | "scripts": {
8 | "build": "node build.js",
9 | "test": "echo \"Error: no test specified\" && exit 1"
10 | },
11 | "repository": {
12 | "type": "git",
13 | "url": "git+https://github.com/trmcnvn/twitch-chat-overlay.git"
14 | },
15 | "author": "Thomas McNiven",
16 | "license": "MIT",
17 | "bugs": {
18 | "url": "https://github.com/trmcnvn/twitch-chat-overlay/issues"
19 | },
20 | "homepage": "https://github.com/trmcnvn/twitch-chat-overlay#readme",
21 | "dependencies": {
22 | "node-zip": "^1.1.1"
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/resources/icon-128.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trmcnvn/twitch-chat-overlay/7cec9f670c96d66f7fb81bc43ce65e4c311a71be/resources/icon-128.jpg
--------------------------------------------------------------------------------
/resources/icon-16.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trmcnvn/twitch-chat-overlay/7cec9f670c96d66f7fb81bc43ce65e4c311a71be/resources/icon-16.jpg
--------------------------------------------------------------------------------
/resources/icon-48.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trmcnvn/twitch-chat-overlay/7cec9f670c96d66f7fb81bc43ce65e4c311a71be/resources/icon-48.jpg
--------------------------------------------------------------------------------
/resources/icon-96.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trmcnvn/twitch-chat-overlay/7cec9f670c96d66f7fb81bc43ce65e4c311a71be/resources/icon-96.jpg
--------------------------------------------------------------------------------
/style.css:
--------------------------------------------------------------------------------
1 | #tco-ext-element {
2 | position: absolute;
3 |
4 | width: 400px;
5 | height: 800px;
6 | min-width: 200px;
7 | min-height: 400px;
8 |
9 | opacity: 0.7;
10 | padding-bottom: 2em;
11 |
12 | resize: both;
13 | overflow: auto;
14 | overflow-y: hidden;
15 |
16 | background-color: #0f0e11;
17 |
18 | transition: opacity 0.35s ease 0s;
19 | }
20 |
21 | #tco-ext-element:hover {
22 | opacity: 1 !important;
23 | }
24 |
25 | #tco-ext-element iframe {
26 | width: 100%;
27 | height: 99%; /* 99% hack... to fix issue with Chrome resize */
28 | }
29 |
30 | #tco-ext-element-titlebar {
31 | width: 100%;
32 | height: 20px;
33 |
34 | background-color: #0f0e11;
35 | cursor: move;
36 | }
37 |
--------------------------------------------------------------------------------