load Ox.js with pandora version to avoid loading outdated version without clearing cache, fixes #1556
This commit is contained in:
parent
ff82ed2863
commit
d85eaed453
1 changed files with 10 additions and 1 deletions
|
@ -58,6 +58,15 @@ appPanel
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function getPandoraVersion() {
|
||||||
|
var i, path, scripts = document.getElementsByTagName('script');
|
||||||
|
for (i = 0;i < scripts.length; i++) {
|
||||||
|
if(/pandora.js/.test(scripts[i].src)) {
|
||||||
|
return scripts[1].src.replace(/.*\?/, '');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function loadImages(callback) {
|
function loadImages(callback) {
|
||||||
// Opera doesn't fire onload for SVGs,
|
// Opera doesn't fire onload for SVGs,
|
||||||
// so we only wait for the PNG to load.
|
// so we only wait for the PNG to load.
|
||||||
|
@ -167,7 +176,7 @@ appPanel
|
||||||
} else {
|
} else {
|
||||||
script.onload = callback;
|
script.onload = callback;
|
||||||
}
|
}
|
||||||
script.src = '/static/oxjs/' + (enableDebugMode ? 'dev' : 'build') + '/Ox.js';
|
script.src = '/static/oxjs/' + (enableDebugMode ? 'dev' : 'build') + '/Ox.js?' + getPandoraVersion();
|
||||||
script.type = 'text/javascript';
|
script.type = 'text/javascript';
|
||||||
head.appendChild(script);
|
head.appendChild(script);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue