-
-
Save mistersourcerer/c402960edf9f9ceca6bb to your computer and use it in GitHub Desktop.
A "sane"(?) way to "play" http://game.notch.net/drowning
This file contains hidden or 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
// go to http://game.notch.net/drowning | |
// open the console | |
// type this: | |
function sleep(millis, callback) { | |
setTimeout(function() | |
{ callback(); } | |
, millis); | |
} | |
var click = document.createEvent("HTMLEvents"); click.initEvent("click", true, true); | |
function clickAllTheThings() { var links = document.getElementsByTagName("a"); for(var i=0; i < document.getElementsByTagName("a").length; i++) { var link = links[i]; link.dispatchEvent(click) }; sleep(500, clickAllTheThings) } | |
clickAllTheThings(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment