Skip to content

Instantly share code, notes, and snippets.

@drewsberry
Last active August 29, 2015 14:19
Show Gist options
  • Save drewsberry/44538e90cc093e6bf48e to your computer and use it in GitHub Desktop.
Save drewsberry/44538e90cc093e6bf48e to your computer and use it in GitHub Desktop.
Press the button...
// First go to www.reddit.com/r/thebutton and unlock the button by clicking on it once
var theButton = document.getElementById("thebutton");
var theButtonTimer10s = document.getElementById("thebutton-s-10s");
var theButtonTimer1s = document.getElementById("thebutton-s-1s");
var ColourToTime = {
blue: "5",
green: "4",
yellow: "3",
orange: "2",
red: "1"
};
// Choose your desired colour here
myColour = "yellow";
setInterval(function() {
if (theButtonTimer10s.innerHTML == ColourToTime[myColour] && theButtonTimer1s.innerHTML == "0") {
// Press the button when you get to your desired colour...
theButton.click();
}
}, 100);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment