From da2c47bb583197920fdd8ccbc6f87a8350451252 Mon Sep 17 00:00:00 2001 From: rolux Date: Mon, 18 Feb 2013 15:25:08 +0530 Subject: [PATCH] in pandora.js, check for isEmbed --- static/js/pandora.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/static/js/pandora.js b/static/js/pandora.js index 3b29974e..372db2a8 100644 --- a/static/js/pandora.js +++ b/static/js/pandora.js @@ -34,6 +34,7 @@ appPanel var animationInterval, enableDebugMode = localStorage && localStorage['pandora.enableDebugMode'], enableEventLogging = localStorage && localStorage['pandora.enableEventLogging'], + isEmbed = /embed=true/.test(document.location.hash), isMSIE = /MSIE/.test(navigator.userAgent), legacyThemes = {classic: 'oxlight', modern: 'oxdark'}, theme = localStorage && localStorage['Ox.theme'] @@ -41,12 +42,18 @@ appPanel theme = legacyThemes[theme] || theme; - loadImages(function(images) { - loadScreen(images); + if (isEmbed) { loadOxJS(function() { loadOxUI(loadPandora); }); - }); + } else { + loadImages(function(images) { + loadScreen(images); + loadOxJS(function() { + loadOxUI(loadPandora); + }); + }); + } function loadImages(callback) { // Opera doesn't fire onload for SVGs, @@ -164,7 +171,7 @@ appPanel function loadOxUI(callback) { Ox.load({ - UI: {theme: theme}, + UI: {theme: theme, showScreen: isEmbed, hideScreen: isEmbed}, Geo: {} }, callback); }