summaryrefslogtreecommitdiff
path: root/itjs/boot.js
diff options
context:
space:
mode:
authorChristian Schneider2009-11-17 14:56:39 +0000
committerChristian Schneider2009-11-17 14:56:39 +0000
commitf6dee426b69cf8225c2a2511bb73a8977866137c (patch)
treee607c7e0c943034bd13f86a2619eaf3c760cbb9b /itjs/boot.js
parent16fcdf0efab6726c2f4b80d827490ea22c7430d5 (diff)
downloaditools-f6dee426b69cf8225c2a2511bb73a8977866137c.tar.gz
itools-f6dee426b69cf8225c2a2511bb73a8977866137c.tar.bz2
itools-f6dee426b69cf8225c2a2511bb73a8977866137c.zip
Added start/end marker and cut off prepended and appended stuff (Swisslife)
Diffstat (limited to 'itjs/boot.js')
-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;