Created
December 1, 2010 19:56
-
-
Save badp/724106 to your computer and use it in GitHub Desktop.
Execute this self-contained script on page load -- unless you _are_ a hero.
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
//seek. | |
function $$() { | |
return document.querySelectorAll.apply(document, arguments); | |
} | |
//hide. | |
function pwn(selector) { | |
targets = document.querySelectorAll(selector); | |
for(i = 0; i < targets.length; i++){ | |
targets[i].style.display = "none"; | |
} | |
} | |
//redeem | |
function redeem(selector) { | |
targets = document.querySelectorAll(selector); | |
for(i = 0; i < targets.length; i++){ | |
targets[i].style.display = "block"; | |
} | |
} | |
//silence. | |
function stfu(selector) { | |
targets = document.querySelectorAll(selector); | |
for(i = 0; i < targets.length; i++){ | |
targets[i].removeAttribute("onmouseover"); | |
targets[i].removeAttribute("onmouseleave"); | |
targets[i].classList.add("off"); | |
} | |
} | |
//disable. | |
function off(selector) { | |
targets = document.querySelectorAll(selector); | |
for(i = 0; i < targets.length; i++){ | |
targets[i].classList.add("off"); | |
targets[i].removeAttribute("onclick"); | |
targets[i].removeAttribute("href"); | |
} | |
} | |
debug = 0; | |
function clearShitUp(){ | |
// I GET IT, Hero is awesome and everything. | |
pwn("#ghostHeroAd"); | |
pwn(".heroHelp"); | |
pwn(".heroAd"); | |
// I GET IT, if I had hero I could be awesome. | |
pwn(".contentPanel .jobs .heroLocked") | |
// I GET IT, World Forums are read only. | |
stfu(".forum .sidePanel .subTabs li a"); | |
forum_name_selector = $$(".forum .sidePanel .subTabs li.selected a"); //are we in a forum? | |
if(forum_name_selector.length){ //yes we are! | |
forum_name = forum_name_selector[0].text; | |
if(debug) | |
console.debug("We are looking at forum", forum_name); | |
if(forum_name[0].text != " ???"){ //whitelisting | |
pwn(".forum .actions"); //reply bar | |
//Also, non-crow threads are usually boring drivel and "community-driven" rallies. | |
//Worthless until the crow replies. Hence. | |
pwn(".forum table.topics tr:not(.highlightedAdmin):not(.separator)"); //thanks, YiJiang | |
} | |
} | |
//I GET IT, only heroes are supposed to get LMS. | |
pwn(".ikea .act") | |
//I GET IT, heroic actions are awesome and I'm not. | |
//only act on the links and let me see what they can do, however. | |
off(".home .left a[href*=hero], .home .left a[href*=Hero]"); | |
//show the heroic actions button as disabled, though... | |
stfu(".home .left a.button[onmouseover]") | |
} | |
if(debug) | |
setInterval(clearShitUp, 1000); | |
else | |
setInterval(clearShitUp, 100); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment