forked from 0x2620/pandora
in pandora.js, check for isEmbed
This commit is contained in:
parent
ecfd8b5172
commit
da2c47bb58
1 changed files with 11 additions and 4 deletions
|
@ -34,6 +34,7 @@ appPanel
|
||||||
var animationInterval,
|
var animationInterval,
|
||||||
enableDebugMode = localStorage && localStorage['pandora.enableDebugMode'],
|
enableDebugMode = localStorage && localStorage['pandora.enableDebugMode'],
|
||||||
enableEventLogging = localStorage && localStorage['pandora.enableEventLogging'],
|
enableEventLogging = localStorage && localStorage['pandora.enableEventLogging'],
|
||||||
|
isEmbed = /embed=true/.test(document.location.hash),
|
||||||
isMSIE = /MSIE/.test(navigator.userAgent),
|
isMSIE = /MSIE/.test(navigator.userAgent),
|
||||||
legacyThemes = {classic: 'oxlight', modern: 'oxdark'},
|
legacyThemes = {classic: 'oxlight', modern: 'oxdark'},
|
||||||
theme = localStorage && localStorage['Ox.theme']
|
theme = localStorage && localStorage['Ox.theme']
|
||||||
|
@ -41,12 +42,18 @@ appPanel
|
||||||
|
|
||||||
theme = legacyThemes[theme] || theme;
|
theme = legacyThemes[theme] || theme;
|
||||||
|
|
||||||
|
if (isEmbed) {
|
||||||
|
loadOxJS(function() {
|
||||||
|
loadOxUI(loadPandora);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
loadImages(function(images) {
|
loadImages(function(images) {
|
||||||
loadScreen(images);
|
loadScreen(images);
|
||||||
loadOxJS(function() {
|
loadOxJS(function() {
|
||||||
loadOxUI(loadPandora);
|
loadOxUI(loadPandora);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function loadImages(callback) {
|
function loadImages(callback) {
|
||||||
// Opera doesn't fire onload for SVGs,
|
// Opera doesn't fire onload for SVGs,
|
||||||
|
@ -164,7 +171,7 @@ appPanel
|
||||||
|
|
||||||
function loadOxUI(callback) {
|
function loadOxUI(callback) {
|
||||||
Ox.load({
|
Ox.load({
|
||||||
UI: {theme: theme},
|
UI: {theme: theme, showScreen: isEmbed, hideScreen: isEmbed},
|
||||||
Geo: {}
|
Geo: {}
|
||||||
}, callback);
|
}, callback);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue