X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fxhr.js;h=3cbfe6782227c95ef6ce6e9a457584e5dbc5cdc9;hb=ae4baf0b0142cc538df4370430f4971440b33ee6;hp=279663dac5ae40ef50f10a59969f128eeadb20a1;hpb=398599544f1ecb5dc0366f165c284022152aa966;p=brisk.git diff --git a/web/xhr.js b/web/xhr.js index 279663d..3cbfe67 100644 --- a/web/xhr.js +++ b/web/xhr.js @@ -33,6 +33,14 @@ var the_end = false; var ct = 0; var watchdog = 0; +function hbit(symb) +{ + if ($("heartbit").innerHTML.length >= 40) + $("heartbit").innerHTML = symb; + else + $("heartbit").innerHTML += symb; +} + function xhr_rd_cb(xhr_rd) { var ret; @@ -55,6 +63,10 @@ function xhr_rd_start(sess,stat,subst,step) return; createCookie("sess", sess, 24*365, xhr_rd_cookiepath); + // NOTE: *ctx = "" to prevent konqueror stream commands duplication. + xhr_rd_oldctx = ""; + xhr_rd_newctx = ""; + /* NOTE document.uniqueID exists only under IE */ // alert("di qui3"); xhr_rd.open('GET', 'index_rd.php?sess='+sess+"&stat="+stat+"&subst="+subst+"&step="+step+"&onlyone="+(document.uniqueID ? "TRUE" : "FALSE")+"&myfrom="+myfrom, true); @@ -87,9 +99,7 @@ function xhr_rd_poll(sess) $("sandbox").innerHTML = zug; /* heartbit log */ - $("heartbit").innerHTML += "_"; - if ($("heartbit").innerHTML.length == 20) - $("heartbit").innerHTML = "_"; + hbit("_"); do { again = 0; @@ -104,6 +114,8 @@ function xhr_rd_poll(sess) singlecomm = gst.comms.shift(); // alert("EXE"+gugu); // $("xhrdeltalog").innerHTML = "EVALL: "+singlecomm.replace("<", "<", "g"); +"
"; + hbit("+"); + eval(singlecomm); again = 1; } @@ -128,9 +140,7 @@ function xhr_rd_poll(sess) watchdog = 0; setTimeout(xhr_rd_poll, tout, sess); - $("heartbit").innerHTML += "-"; - if ($("heartbit").innerHTML.length == 20) - $("heartbit").innerHTML = "-"; + // hbit("."); } return; @@ -155,6 +165,8 @@ function xhr_rd_poll(sess) var delta = 0; var match_lines = /^_*$/; + hbit("/\\"); + // check for the same command group if (xhr_rd_old_n != xhr_rd_cur_n) { xhr_rd_old_n = xhr_rd_cur_n; @@ -219,9 +231,7 @@ function xhr_rd_poll(sess) if (the_end != true) { setTimeout(xhr_rd_poll, tout, sess); - $("heartbit").innerHTML += "-"; - if ($("heartbit").innerHTML.length == 20) - $("heartbit").innerHTML = "-"; + // hbit("."); } return;