From: Matteo Nastasi (mop) Date: Sat, 13 Jan 2007 05:05:25 +0000 (+0000) Subject: aggiunto heartbit e alcune modifiche per essere piu' konqueror friendly X-Git-Tag: 3.0.0~386 X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=commitdiff_plain;h=212529a990fbf05284b61a771bf99df0c12b3c54;p=brisk.git aggiunto heartbit e alcune modifiche per essere piu' konqueror friendly --- diff --git a/web/xhr.js b/web/xhr.js index 0265e24..fba8002 100644 --- a/web/xhr.js +++ b/web/xhr.js @@ -24,7 +24,7 @@ var xhr_rd_cookiepath = "/brisk/"; var xhr_rd = false; var xhr_rd_stopped = true; var xhr_rd_oldctx = ""; -var xhr_rd_newctx; +var xhr_rd_newctx = ""; var xhr_rd_cur_n = -1; var xhr_rd_old_n = -1; @@ -89,9 +89,9 @@ function xhr_rd_poll(sess) /* heartbeat log */ - $("sandbox2").innerHTML += "_"; - if ($("sandbox2").innerHTML.length == 20) - $("sandbox2").innerHTML = "_"; + $("heartbit").innerHTML += "_"; + if ($("heartbit").innerHTML.length == 20) + $("heartbit").innerHTML = "_"; do { again = 0; @@ -112,7 +112,10 @@ function xhr_rd_poll(sess) else { xhrrestart = 1; try { - xhr_rd_newctx = xhr_rd.responseText; + if (xhr_rd == null) + throw "restart"; + if (xhr_rd.responseText != null) + xhr_rd_newctx = xhr_rd.responseText; } catch (e) { if (xhr_rd_stopped == true) { @@ -126,9 +129,9 @@ function xhr_rd_poll(sess) if (the_end != true) { watchdog = 0; setTimeout(xhr_rd_poll, tout, sess); - $("sandbox2").innerHTML += "-"; - if ($("sandbox2").innerHTML.length == 20) - $("sandbox2").innerHTML = "-"; + $("heartbit").innerHTML += "-"; + if ($("heartbit").innerHTML.length == 20) + $("heartbit").innerHTML = "-"; } return; } @@ -215,9 +218,9 @@ function xhr_rd_poll(sess) // $("sandbox").innerHTML += "return 3
"; if (the_end != true) { setTimeout(xhr_rd_poll, tout, sess); - $("sandbox2").innerHTML += "-"; - if ($("sandbox2").innerHTML.length == 20) - $("sandbox2").innerHTML = "-"; + $("heartbit").innerHTML += "-"; + if ($("heartbit").innerHTML.length == 20) + $("heartbit").innerHTML = "-"; } return; };