diff options
Diffstat (limited to 'www/static/js/poll.js')
| -rwxr-xr-x | www/static/js/poll.js | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/www/static/js/poll.js b/www/static/js/poll.js deleted file mode 100755 index 01f480b..0000000 --- a/www/static/js/poll.js +++ /dev/null @@ -1,53 +0,0 @@ -var Poll = - { - room: "main", - delay: 5000, - init: function () - { - if (document.cookie) - { - var cookies = document.cookie.split(";") - for (i in cookies) - { - var cookie = cookies[i].split("=") - if (cookie[0].indexOf("room") !== -1) - { - if (cookie[1] !== 'false' && cookie[1] !== 'undefined') - { - Poll.room = cookie[1] - break - } - } - } - } - Poll.poll() - }, - poll: function () - { - $.post(API.URL.room.poll, - { - room: Poll.room, - session: Auth.session, - last: 1, - }).success(Poll.pollCallback).error(Poll.pollErrorCallback) - }, - pollErrorCallback: function () - { - Poll.timer = setTimeout(Poll.poll, Poll.delay) - }, - pollCallback: function (raw) - { - Poll.timer = setTimeout(Poll.poll, Poll.delay) - } - } -var Main = - { - init: function () - { - Auth.success = Poll.init - if (Auth.init()) - Auth.checkin() - } - } -Main.init() - |
