2024-10-27 14:47:03 +02:00
|
|
|
// a bit hackish way to find the path but it will get the job done
|
|
|
|
var socket = io({"path": window.location.pathname.replace(/(\/control\/?|\/)?$/, "") + "/socket.io"});
|
2012-06-05 08:45:50 +03:00
|
|
|
|
2012-06-08 17:06:54 +03:00
|
|
|
socket.on('time', function (data) {
|
|
|
|
$('#countdown').html(data.time);
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#start').click(function() {
|
|
|
|
socket.emit('click:start');
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#stop').click(function() {
|
|
|
|
socket.emit('click:stop');
|
2012-06-05 08:45:50 +03:00
|
|
|
});
|
|
|
|
|
|
|
|
$('#reset').click(function() {
|
2012-06-08 17:06:54 +03:00
|
|
|
socket.emit('click:reset');
|
2022-10-12 22:53:16 +03:00
|
|
|
});
|
|
|
|
|
|
|
|
$('#resetShort').click(function() {
|
|
|
|
socket.emit('click:resetShort');
|
|
|
|
});
|