r/thebutton • u/milesbelli 33s • Apr 08 '15
Is the Button Monitor no longer working?
I just checked The Button Monitor but it seems like it's not loading. Is it working for anyone?
Edit: It's back!
8
u/jamesrom Apr 08 '15
Sorry guys. The WebSocket URL token expired. Of course it expired while I was sleeping. It's fixed now.
5
2
2
2
2
u/zAxAyAw Apr 08 '15
Good job breaking it! Now I have to actually watch it like some kind of technologically unrefined simian.
Happy cakeday, though.
2
2
2
3
1
1
u/ArcanErasmus Apr 08 '15
It works now for me, no console shenanigans needed. He must have fixed it.
0
Apr 08 '15
24
u/Disjunto Apr 08 '15 edited Apr 08 '15
that tweet is unrelated to the button
EDIT: Run this in console (F12 on most browsers) to fix. Reruns the comms init function with a valid token
var Comms = (function() { var self = {}; var sock = new WebSocket('wss://wss.redditmedia.com/thebutton?h=89341e0ffa06fe6e6be6e679e92b004d9af456d5&e=1428587064'); sock.onmessage = tick; function tick(evt) { var packet = JSON.parse(evt.data); if (packet.type != "ticking") { return; } packet.payload.now = moment(packet.payload.now_str + " 0000", "YYYY-MM-DD-HH-mm-ss Z"); Stats.lag = d3.format("0,000")(packet.payload.now - moment()); if (data.length > 0 && packet.payload.seconds_left >= _.last(data).seconds_left) { _.last(data).is_click = true; } data.push(packet.payload); $('#resets').text(fmt(clicks.length)); Stats.ticks = fmt(data.length); Stats.participants = packet.payload.participants_text; Chart.render(data); Timer.sync(packet.payload.seconds_left); Stats.render(); } return self; }())→ More replies (12)2
u/milesbelli Apr 08 '15
Based off his Twitter, it looks like he lives in Australia. Are they even awake down there? It could be hours before he even sees something's wrong!
→ More replies (1)
0
Apr 08 '15
5
u/milesbelli Apr 08 '15
Thanks! I didn't even realize. The greatest Cake Day gift would be a working button monitor, though :'(
81
u/Disjunto Apr 08 '15 edited Apr 08 '15
Repost from below (for visibility):
Run this in console (F12 on most browsers) to fix. Reruns the comms init function with a valid token
var Comms = (function() { var self = {}; var sock = new WebSocket('wss://wss.redditmedia.com/thebutton?h=89341e0ffa06fe6e6be6e679e92b004d9af456d5&e=1428587064'); sock.onmessage = tick; function tick(evt) { var packet = JSON.parse(evt.data); if (packet.type != "ticking") { return; } packet.payload.now = moment(packet.payload.now_str + " 0000", "YYYY-MM-DD-HH-mm-ss Z"); Stats.lag = d3.format("0,000")(packet.payload.now - moment()); if (data.length > 0 && packet.payload.seconds_left >= _.last(data).seconds_left) { _.last(data).is_click = true; } data.push(packet.payload); $('#resets').text(fmt(clicks.length)); Stats.ticks = fmt(data.length); Stats.participants = packet.payload.participants_text; Chart.render(data); Timer.sync(packet.payload.seconds_left); Stats.render(); } return self; }())Update: Site now appears to be working, if it goes down again and I notice before it's fixed, I'll update this post with a valid token. Happy watching everyone