update message event listener
This commit is contained in:
parent
ebdc2b7057
commit
16d0856565
1 changed files with 7 additions and 7 deletions
|
@ -315,15 +315,15 @@ appPanel
|
||||||
if (isEmbed) {
|
if (isEmbed) {
|
||||||
pandora.$ui.embedPanel = pandora.ui.embedPanel().display();
|
pandora.$ui.embedPanel = pandora.ui.embedPanel().display();
|
||||||
window.addEventListener('message', function(e) {
|
window.addEventListener('message', function(e) {
|
||||||
var data;
|
var data = {}
|
||||||
try {
|
try {
|
||||||
data = JSON.parse(e.data);
|
data = JSON.parse(e.data);
|
||||||
|
} catch(e) {}
|
||||||
if (Ox.contains(pandora.site.themes, data.theme)) {
|
if (Ox.contains(pandora.site.themes, data.theme)) {
|
||||||
Ox.Theme(data.theme);
|
Ox.Theme(data.theme);
|
||||||
} else if (pandora.isEmbedURL(data.url)) {
|
} else if (pandora.isEmbedURL(data.url)) {
|
||||||
pandora.URL.push(data.url);
|
pandora.URL.push(data.url);
|
||||||
}
|
}
|
||||||
} catch() {}
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
pandora.$ui.appPanel = pandora.ui.appPanel().display();
|
pandora.$ui.appPanel = pandora.ui.appPanel().display();
|
||||||
|
|
Loading…
Reference in a new issue