summaryrefslogtreecommitdiff
path: root/static/longpolling.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/longpolling.js')
-rw-r--r--static/longpolling.js17
1 files changed, 2 insertions, 15 deletions
diff --git a/static/longpolling.js b/static/longpolling.js
index 75c6faeaf..5b704acec 100644
--- a/static/longpolling.js
+++ b/static/longpolling.js
@@ -3,17 +3,7 @@
connfails=0;
-connfailed=
- '<div id="modal" class="modal fade">' +
- ' <div class="modal-header">' +
- ' <h3>git-annex has shut down</h3>' +
- ' </div>' +
- ' <div class="modal-body">' +
- ' You can now close this browser window.' +
- ' </div>' +
- '</div>' ;
-
-function longpoll(url, divid, cont) {
+function longpoll(url, divid, cont, fail) {
$.ajax({
'url': url,
'dataType': 'html',
@@ -25,10 +15,7 @@ function longpoll(url, divid, cont) {
'error': function(jqxhr, msg, e) {
connfails=connfails+1;
if (connfails > 3) {
- // blocked by many browsers
- window.close();
- $('#modal').replaceWith(connfailed);
- $('#modal').modal('show');
+ fail();
}
else {
cont();