X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fxynt-http-streaming-ifra.js;fp=web%2Fxynt-http-streaming-ifra.js;h=a0bc1f05e4c3eb6f792112c57b723687c60fdebf;hb=34ccc0593731592021bee6ab1661f8eb5ab5b1a4;hp=0000000000000000000000000000000000000000;hpb=6e77afdc4d237f78495ca70fdc82d1059d94643f;p=brisk.git diff --git a/web/xynt-http-streaming-ifra.js b/web/xynt-http-streaming-ifra.js new file mode 100644 index 0000000..a0bc1f0 --- /dev/null +++ b/web/xynt-http-streaming-ifra.js @@ -0,0 +1,41 @@ +var ctx_new = ""; +var ctx_old_len = 0; +var last_clean = 0; +var script_clean = -1; + +function push(s) { + var i; + + for (i = last_clean ; i < script_clean ; i++) { + if (typeof($('hs'+i)) != 'undefined' && $('hs'+i) != null) { + document.body.removeChild($('hs'+i)); + // if (typeof(CollectGarbage) == "function") { + // CollectGarbage(); + // } + + last_clean = i; + } + else { + // window.parent.console.log('ifra: hs'+i+" NOT FOUND"); + } + } + // FIXME: remove this barbarian log + // window.parent.console.log("ifra: ctx_new.length: "+ctx_new.length+" ctx_old_len: "+ctx_old_len); + if (ctx_new.length == ctx_old_len && ctx_old_len > 0) { + // FIXME: remove this barbarian log + // window.parent.console.log("ifra: NOW clean"); + // alert("cleanna"); + ctx_new = ""; + ctx_old_len = 0; + } + if (s != null) { + ctx_new = ctx_new + "@BEGIN@" + s + "@END@"; + // FIXME: remove this barbarian log + window.parent.console.log("ifra: CTX_NEW: ["+ctx_new+"]"); + + } + else { + ctx_new = ctx_new + "_"; + } + return; +}