Skip to content

Instantly share code, notes, and snippets.

@drdaxxy
Last active November 1, 2015 15:50
Show Gist options
  • Save drdaxxy/1d8bcebb4976dd839f13 to your computer and use it in GitHub Desktop.
Save drdaxxy/1d8bcebb4976dd839f13 to your computer and use it in GitHub Desktop.
Updates stream title for Twitch Installs Arch Linux whenever a new command is entered. Lets you see the last command without having to watch chat, or wait for the stream to catch up. Instructions: Wait for chat to load, open javascript console (e.g. hit F12 then click Console in Chrome), copy-paste this and hit enter.
$(".chat-lines").first().bind('DOMNodeInserted', function(event) {
if($(event.target).find(".from").text() == "TwitchInstallsArchLinux") {
var message = $(event.target).find(".message").text();
if(message.startsWith("Winning")) {
$("#broadcast-meta > .info > .title")
.hide()
.text((new Date()).toLocaleTimeString("en-GB") + " - " + message)
.css("background-color", "red")
.fadeIn(1000).dequeue()
.animate({ backgroundColor: "white" }, 1000);
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment