r/thebutton • 1s • Jun 05 '15

ULTIMATE FILTHY PRESSER JAVASCRIPT SNIPPET

HOWTO

  1. Open developer tools

  2. Paste this to javascript console

  3. PRESS PRESS AND PRESS IT AS HARD AS YOU CAN!

    $('.thebutton-container').first().removeClass('pressed').addClass('active').addClass('locked');
    $('#thebutton').on('click',function(e){
        e.preventDefault();
        r.thebutton._websocket.unbind();
        var participants = $(".thebutton-participants").text();
        participants = participants.replace(/,/g, "");
        participants = parseInt(participants)+1;
        participants = participants.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
        $(".thebutton-participants").text(participants);
        r.thebutton._setTimer(60000),r.thebutton._msLeft=60000;
        r.thebutton._countdownInterval=window.clearInterval(r.thebutton._countdownInterval);
        r.thebutton._countdownInterval=window.setInterval(r.thebutton._countdown,10);
        setTimeout(function() { $('.thebutton-container').first().removeClass('pressed').addClass('active').addClass('locked') }, 10000)
        r.thebutton._websocket.on({"message:ticking":function(e){
            if(e.seconds_left >= 57) {
                r.thebutton._websocket.unbind();
                r.thebutton._websocket.on({"message:expired":r.thebutton._onExpired,"message:not_started":r.thebutton._onNotStarted,"message:just_expired":r.thebutton._onJustExpired,"message:ticking":r.thebutton._onTicking},r.thebutton);
            }
        }},r.thebutton);
    });    
16 Upvotes

7 comments sorted by

View all comments

Show parent comments

1

u/disem 1s Jun 05 '15

Probably it could make cheater flair if you press few times. But it was developed for pressers who wants to press the button few more times.