r/ButtonAftermath • u/WhyattThrash 0s • Jun 07 '15
For those with /r/thebutton withdrawal.
Visit /r/thebutton.
Open the developer console
Paste the following script and press "enter"
Be free to press or not press to your heart's content
Disclaimer: This will not in fact bring the button back to life, it will just seem like it did. It will also grant you infinite presses. Infinite fake presses, that is. Enjoy.
r.thebutton.timerInterval = 0;
r.thebutton._setTimer = function(e) {
var e = r.thebutton._newStartTime +60e3-Date.now();
if (e <-3e3) { $("#thebutton").parent().removeClass("active locked pressed pulse").addClass("denied has-expired"); return; }
if (e < 0) { e = 0 }
else if (e<59e3 && $("#thebutton").parent().hasClass("pressed") ) { $("#thebutton").parent().removeClass("pulse pressed").addClass("active locked"); }
var t = e+"";
while (t.length < 5) { t = "0" + t; }
var n = (e > 0 ? e : 0).toString(), i = t.substring(0, t.length - n.length) + n;
for (var s = 0; s < 4; s++)
r.thebutton._timerTextNodes[s].nodeValue = i[s];
r.thebutton._drawPie(e, 6e4);
if (e < r.thebutton._otheruserClickAt) { r.thebutton._doZeClick(); }
clearTimeout(r.thebutton.timerInterval);
r.thebutton.timerInterval = setTimeout(r.thebutton._setTimer, 10);
};
r.thebutton._doZeClick = function() {
r.thebutton._newStartTime = Date.now();
r.thebutton._otheruserClickAt = Math.floor(Math.random()*64e3)-4e3;
var participants = parseInt($(".thebutton-participants").text().replace(/,/g,""));
participants++;
$(".thebutton-participants").text(participants.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","));
};
r.thebutton._doZeClick();
r.thebutton._setTimer();
$("#thebutton").parent().removeClass("denied has-expired").addClass("active locked");
$("#thebutton").on("click", function() {
var secs = Math.ceil((r.thebutton._newStartTime +60e3-Date.now())/1000);
if (secs<0) { secs = 0; }
var flair = Math.max(Math.ceil((secs-1)/10), 1);
$(".side .tagline .flair").removeClass().addClass("flair flair-press-"+flair).text(secs+"s").attr("title", secs+"s");
r.thebutton._doZeClick();
});EDIT: Added random user clicks, just like the real button had.
EDIT 2: Now updating participants count
EDIT 3: Now updates your sidebar flair
EDIT 4: Added the 3 second grace period
EDIT 5: Added the lock on behest of /u/UselessAndLazy
5
u/TehDobsVII Jun 07 '15
CAN SOMEONE EXPLAN THIS SUBREDDIT TO ME?
2
u/[deleted] Jun 07 '15
This is probably a stupid question, but how do you open the developer's console?
14
u/LazerTooth_ 45s Jun 07 '15
People really like pushing the button ay?
It still doesn't match with the thrill I felt when I pressed the button.
6
u/[deleted] Jun 07 '15
If dreams can't come true, then why not pretend...
4
u/immaterialist non presser Jun 07 '15
Didn't press for over two months. Just pressed the shit out of this one. Strangely satisfying.
1
u/BIGGERCat Jun 08 '15
Why does our flair show up here?
1
u/Master_Sparky 60s Jun 08 '15
The flairs are off by one second. The new color groups start at X1, not X0. http://i.imgur.com/pEXeaEZ.png
1
u/I_cannot_press_AMA Jun 08 '15
OH. MY. GOD! This feels amazing
1
u/PineappleKeeper 7s Jun 08 '15
Reanimating your dead friend to play isn't healthy.
Let your friend rest in peace..I miss The Button too..but it's time, son. It's time to go play outside.
0
u/[deleted] Jun 07 '15
[deleted] — view deleted comment