Created
August 20, 2015 14:02
-
-
Save CrowderSoup/23fe003fe6309e776181 to your computer and use it in GitHub Desktop.
A bot to play "Drowning in Problems" for you. http://game.notch.net/drowning/
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
var interval = setInterval(function(){ | |
var aTags = document.getElementsByTagName("a"); | |
// Bail out if we didn't find any anchor tags. | |
if(aTags.length <= 0) { | |
return; | |
} | |
// Get the IDs of the tags we're going to click | |
var aTagIds = []; | |
for(var i = 0; i < aTags.length; i++) { | |
aTagIds[i] = aTags[i].id; | |
} | |
// CLICK ALL THE THINGS | |
for(var i = 0; i < aTagIds.length; i++){ | |
var a = document.getElementById(aTagIds[i]); | |
a.click(); | |
} | |
}, 500); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment