summaryrefslogtreecommitdiff
path: root/itjs
diff options
context:
space:
mode:
Diffstat (limited to 'itjs')
-rw-r--r--itjs/boot.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/itjs/boot.js b/itjs/boot.js
index 0d9a737..6ee8845 100644
--- a/itjs/boot.js
+++ b/itjs/boot.js
@@ -197,20 +197,20 @@ function it_boot(file, isretry)
if (loader.status < 400) // Opera gives back 304 if from cache
{
// check length cookie
- var ln = String(loader.responseText).substr(-16).match(/\*sln:\s*([0-9]+)\*/);
- code = loader.responseText;
- if (ln && ln[1]-0 == loader.responseText.length)
+ var ln = String(loader.responseText).match(/\*sln:([0-9]+)[^\n]*\n([\s\S]*\n)\/\*eln:\1/);
+ code = ln ? ln[2] : loader.responseText;
+ if (ln && ln[1]-0 == code.length)
{
it_boot.sequence += "e";
if (!window.env || !!window.env.is_live_server)
- code = "try {" + loader.responseText + "} catch (e) { it_catcherr(e.message, it_boot.file, -1); }"; // Wrapped in try/catch as Konqueror does not support window.onerror
+ code = "try {" + code + "} catch (e) { it_catcherr(e.message, it_boot.file, -1); }"; // Wrapped in try/catch as Konqueror does not support window.onerror
if (window.execScript)
window.execScript(code, "javascript"); // IE work-around to get script executed in global scope
else
window.setTimeout(code, 0); // Standard compliant version
}
else
- error = (ln ? "length mismatch: "+ln[1]+" != "+loader.responseText.length : "no length cookie");
+ error = (ln ? "length mismatch: " + ln[1] + " != " + code.length : "no length cookie");
}
else
error = loader.statusText;