Skip to content

Instantly share code, notes, and snippets.

@CrowderSoup
Created August 20, 2015 14:02
Show Gist options
  • Save CrowderSoup/23fe003fe6309e776181 to your computer and use it in GitHub Desktop.
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/
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