diff options
| author | root <root@dino.fm> | 2013-04-21 20:00:42 -0400 |
|---|---|---|
| committer | root <root@dino.fm> | 2013-04-21 20:00:42 -0400 |
| commit | 3790eedc2f48c725c586b8c7b924875fedbeb7b4 (patch) | |
| tree | 6ad7a958495ea2bf8f02846eb9b8ec6127bcb136 /www/static/js/poll.js | |
| parent | 5a309541befe767901b24ca2389a1497d16ab5f5 (diff) | |
getting ready to push
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() - |
