Skip to content

Instantly share code, notes, and snippets.

@techygrrrl
Created December 4, 2022 05:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save techygrrrl/d0bf087d13e0fa4534a533ffdb690a1a to your computer and use it in GitHub Desktop.
Save techygrrrl/d0bf087d13e0fa4534a533ffdb690a1a to your computer and use it in GitHub Desktop.
Makes the chat username colour the same colour as the chat text. Supports both light and dark modes.
// ==UserScript==
// @name Twitch Plain Chat colours
// @namespace https://techygrrrl.stream
// @version 0.1
// @description Make the chat username colour the main text colour.
// @author techygrrrl
// @match https://*.twitch.com/*
// @match https://*.twitch.tv/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
let found = false
// Check and click in milliseconds
const CHECK_INTERVAL = 200
setInterval(() => {
perform()
}, CHECK_INTERVAL)
function perform() {
if (found) return
const css = `
.chat-author__display-name {
color: inherit !important;
}
`
const styleTag = document.createElement('style')
styleTag.innerHTML = css
document.head.appendChild(styleTag)
found = true
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment