Skip to content

Instantly share code, notes, and snippets.

@panphora
Created February 25, 2016 02:14
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save panphora/08a96ae76d0be51f9371 to your computer and use it in GitHub Desktop.
Save panphora/08a96ae76d0be51f9371 to your computer and use it in GitHub Desktop.
Slow down twitch chat
// INSTRUCTIONS
// 1. paste in Google Chrome dev console
// 2. enjoy!
// don't display any chat messages by default
var style = document.createElement("style");
style.appendChild(document.createTextNode(""));
document.head.appendChild(style);
style.sheet.insertRule("body .ember-chat .chat-messages .chat-line {display: none;}", 0);
// every second (1000ms), show the last chat message
setInterval(function () {
var allChatLines = Array.from(document.querySelectorAll('.ember-chat .chat-messages .chat-line'));
var lastChatLine = allChatLines[allChatLines.length - 1];
lastChatLine.style.display = 'block';
}, 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment