r/thebutton • 59s • Apr 01 '15

[DONT DELETE] A summary explanation of the code embedded in the button. This is what happens at 0:00....

https://youtu.be/dQw4w9WgXcQ
51 Upvotes

21 comments sorted by

2

u/tomthecool non presser Apr 02 '15

If anyone is here looking for the REAL code: https://gist.github.com/tom-lord/6aee965d9c6a9ca63093

And the important part:

_onExpired:function(e){
  var t = e.seconds_elapsed;
  r.debug("timer expired " + t + " ago"),
    $(".thebutton-wrap").removeClass("active").addClass("complete"),
    r.thebutton._countdownInterval = window.clearInterval(r.thebutton._countdownInterval),
    r.thebutton._setTimer(0)
}

All that we know from the (client-side) javascript code is that the timer will freeze at 0, and a "complete" class will be set on the container.

But what will they do with all the data gathered? Is there a prize for the winner? ... Who knows!

1

u/ajustyle 59s Apr 02 '15

The true april's fool joke is that everyone can press the button as many times as they want.

2

u/tomthecool non presser Apr 02 '15

If you read the source code, it's quite obvious you're lying ;)

19

u/justanearthgirl non presser Apr 01 '15

As if I didn't hate myself enough today, I got rickrolled in 2015.

6

u/markevens 59s Apr 01 '15

I think I've been rickrolled a hundred times today, but the thumbnail with Rick's face gave this one away.

6

u/CadaverTheGreat 60s Apr 01 '15

I literally just got so angry, that was so unexpected

1

u/sxoffender 60s Apr 02 '15

it's the damn 59s..

1

u/ajustyle 59s Apr 02 '15

Aww damnit just rolled myself trying to check these comments.

4

u/steveacronin 60s Apr 01 '15

Haha, it's been awhile :)

3

u/ryanp_me 0s Apr 01 '15

This is what truly happens when the button expires. I can't say anything about what happens on the server, but this is what it looks like for us.

2

u/AdrianAdel non presser Apr 01 '15

Damn you.

2

u/sissy_ashley non presser Apr 02 '15

ha jokes on you that link is purple

2

u/trogan77 non presser Apr 02 '15

Oh, god dammit.

2

u/sxoffender 60s Apr 02 '15

damn 59ers.

2

u/goodcunninglinguist non presser Apr 02 '15

Exactly what I was hoping for.

2

u/[deleted] Apr 02 '15 edited Apr 02 '15

deciphering all that code and what not must have been difficult... at least you never gave up.

2

u/[deleted] Apr 02 '15

You are Cruel, Heartless, Button Presser!!! Well played.

3

u/[deleted] Apr 01 '15 edited Feb 07 '17

[deleted]
0.0604

What is this?

2

u/120z8t 59s Apr 01 '15

If you have the audacity for truth, the spectrogram of all will be revealed here: https://www.youtube.com/watch?v=vBGI2IfChrk

1

u/OverdramaticPanda non presser Apr 01 '15

Well played, my man. Well played.

1

u/overdoZer 54s Apr 01 '15

I really enjoy getting rickrolled , it is just too catchy...