-
Notifications
You must be signed in to change notification settings - Fork 0
jerrycorp/auto_wooter
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
var baseUrl = "http://i.imgur.com/"; var wooting = true; function startWooting() { stopWooting(); API.on(API.DJ_ADVANCE, DJ_ADVANCE_LISTENER); wootSong(); var css = document.createElement("style"); css.type = "text/css"; css.setAttribute('id', 'autowooter-css'); css.innerHTML = "#autowooter-button { left: 213px; } .autowooter-icon-on { position: absolute; width: 30px; height: 30px; background: url("+ baseUrl + "9afjx9c.png); } .autowooter-icon-off { position: absolute; width: 30px; height: 30px; background: url("+ baseUrl + "aQ7Xot2.png); }"; document.body.appendChild(css); $('#chat-header').append('<div id="autowooter-button" class="chat-header-button"><i class="autowooter-icon autowooter-icon-on"></i></div>'); API.chatLog(); $("#autowooter-button").click(function() { if(wooting) { $("#autowooter-button").html('<i class="autowooter-icon autowooter-icon-off"></i>'); } else { $("#autowooter-button").html('<i class="autowooter-icon autowooter-icon-on"></i>'); } wooting = !wooting; wootSong(); }); } function stopWooting() { API.off(API.DJ_ADVANCE, DJ_ADVANCE_LISTENER); wootSong(); $('#autowooter-js').remove(); $('#autowooter-css').remove(); $('#autowooter-button').remove(); } function DJ_ADVANCE_LISTENER(obj) { wootSong(); } function wootSong() { if(wooting) { $("#woot").click(); } } startWooting();
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published