Last active
November 17, 2021 19:32
-
-
Save ItsDanielHarris/46da6e49f67ddc9a123d8249fd218d3a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Twitch Chat Overlay extension opacity fix | |
// @namespace @ItsDanielHarris | |
// @description Enhances the visiblity of the Twitch Chat Overlay chat box | |
// @include https://www.twitch.tv/* | |
// @include https://www.twitch.tv | |
// @version 0.1 | |
// @run-at document-start | |
// @grant none | |
// ==/UserScript== | |
function set_tco_opacity(styles) { | |
var css = document.createElement('style'); | |
css.type = 'text/css'; | |
if (css.styleSheet) { | |
css.styleSheet.cssText = styles; | |
} else { | |
css.appendChild(document.createTextNode(styles)); | |
} | |
document.getElementsByTagName("body")[0].appendChild(css); | |
} | |
var bg_opacity = 0.1; | |
var styles = 'body { background: rgba(100,100,100,'+bg_opacity+')!important; } .chat-room { background: rgba(100,100,100,'+bg_opacity+')!important; } .stream-chat-header, .channel-leaderboard { display: none!important; } #tco-ext-element-titlebar { background-color: rgba(100,100,100,'+bg_opacity+')!important; } .chat-line__message { font-size: 20px !important;} .bttv-emote img, .chat-image__container img { width: auto !important; max-width: 50px !important; height:45px !important; margin: 0px 0px 5px 0px !important; } .chat-line__message--emote img {margin: -5px 11px !important;} .community-highlight-stack__backlog-card, .community-highlight-stack__scroll-area--disable { display: none !important; }'; | |
window.onload = function() { set_tco_opacity(styles) }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment