load Ox.js only once

This commit is contained in:
j 2012-05-28 13:36:10 +02:00
commit 25b87a10b0
2 changed files with 3 additions and 9 deletions

View file

@ -38,13 +38,9 @@ appPanel
loadImages(function(images) {
loadScreen(images);
if (debug) {
loadOxJS(function() {
loadOxUI(loadPandora);
});
} else {
loadOxJS(function() {
loadOxUI(loadPandora);
}
});
});
function loadImages(callback) {
@ -155,7 +151,7 @@ appPanel
} else {
script.onload = callback;
}
script.src = '/static/oxjs/dev/Ox.js';
script.src = '/static/oxjs/' + (debug ? 'dev' : 'build') + '/Ox.js';
script.type = 'text/javascript';
head.appendChild(script);
}