Skip to content

Instantly share code, notes, and snippets.

@Thelonedevil
Created September 26, 2015 19:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Thelonedevil/db782ea71d78b17c5193 to your computer and use it in GitHub Desktop.
Save Thelonedevil/db782ea71d78b17c5193 to your computer and use it in GitHub Desktop.
Adds all global badges to your name in the twitch chat (client only), Just replace "the_lone_devil" with the username.
function allBadges(){
var lines = document.getElementsByClassName("chat-line");
[].forEach.call(lines, function(i){
if(i.getAttribute("data-sender").toString() == "the_lone_devil"){
var badges = i.getElementsByClassName("badges");
badges[0].innerHTML =
"<div original-title='Twitch Admin' class='admin badge'></div> \
<div original-title='Staff' class='staff badge'></div>\
<div original-title='Channel Broadcaster' class='broadcaster badge'></div>\
<div original-title='Turbo' class='turbo badge'></div>\
<div original-title='Moderator' class='moderator badge'></div>\
<div original-title='Global Mod' class='global-moderator badge'></div>"
}
});
}
@ArtDesignWorks
Copy link

Hello :) just need to put this js in twitch client ? or ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment