Created
September 26, 2015 19:19
-
-
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.
This file contains 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
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>" | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello :) just need to put this js in twitch client ? or ?