diff options
Diffstat (limited to 'templates/notifications')
-rw-r--r-- | templates/notifications/longpolling.julius | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/templates/notifications/longpolling.julius b/templates/notifications/longpolling.julius new file mode 100644 index 000000000..affa50cc8 --- /dev/null +++ b/templates/notifications/longpolling.julius @@ -0,0 +1,12 @@ +function longpoll_#{ident}() { + longpoll(longpoll_#{ident}_url, '#{ident}' + , function() { setTimeout(longpoll_#{ident}, #{delay}); } + , function() { webapp_disconnected(); } + ); +} +$(function() { + $.get("@{geturl}", function(url){ + longpoll_#{ident}_url = url; + setTimeout(longpoll_#{ident}, #{startdelay}); + }); +}); |