From 25b87a10b0d7bd45bdf409ca4ff2895f92260fbd Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Mon, 28 May 2012 13:36:10 +0200 Subject: [PATCH] load Ox.js only once --- pandora/templates/index.html | 2 -- static/js/pandora.js | 10 +++------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/pandora/templates/index.html b/pandora/templates/index.html index ab654c79..cfc29570 100644 --- a/pandora/templates/index.html +++ b/pandora/templates/index.html @@ -4,7 +4,6 @@ {{title}} - @@ -14,7 +13,6 @@ if (localStorage && !localStorage['Ox.theme']) localStorage['Ox.theme'] = '"{{settings.CONFIG.user.ui.theme}}"'; - diff --git a/static/js/pandora.js b/static/js/pandora.js index e603a1dd..ee56b31c 100644 --- a/static/js/pandora.js +++ b/static/js/pandora.js @@ -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); }