Skip to content

Instantly share code, notes, and snippets.

@nemo
Created April 13, 2015 07:26
Show Gist options
  • Save nemo/043cad07685c370061ba to your computer and use it in GitHub Desktop.
Save nemo/043cad07685c370061ba to your computer and use it in GitHub Desktop.
Get 1s on The Button in Reddit
// Go to http://www.reddit.com/r/thebutton
// 1. Click on the button once to unlock it.
// 2. Paste the following code into the Javascript Console in Chrome.
function getTheButton() {
var didPress = false;
var currentNumber = parseInt($("#thebutton-s-10s").text() + $("#thebutton-s-1s").text());
if (currentNumber === 1) { // 1 second left! Click!
$(".thebutton-container.active.unlocked").click();
didPress = true;
}
console.log("Ran a check for: " + currentNumber + " (pressed: " + didPress + ")");
setTimeout(getTheButton, 100);
}
setTimeout(getTheButton, 100);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment