Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
r/thebutton
var socket = new WebSocket(r.thebutton._websocket._url);
socket.onmessage = function (event) {
payload = JSON.parse(event.data).payload;
console.log(payload.seconds_left);
if (payload.seconds_left == 1.0) {
document.getElementById('thebutton').click();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.