dont use window.top, throws security exception

This commit is contained in:
j 2013-12-23 14:51:46 +00:00
parent bd9f5164b8
commit 941c4f9759
2 changed files with 3 additions and 3 deletions

View file

@ -135,7 +135,7 @@ pandora.ui.embedPlayer = function() {
+ document.location.hostname + '/' + document.location.hostname + '/'
+ options.item + '/' + options.item + '/'
+ Ox.formatDuration($player.options('position')); + Ox.formatDuration($player.options('position'));
window.top.open(url, '_blank'); window.open(url, '_blank');
}, },
playing: function(data) { playing: function(data) {
setPosition(data.position, true); setPosition(data.position, true);

View file

@ -255,7 +255,7 @@ pandora.clickLink = function(e) {
} }
pandora.URL.push(e.target.pathname, true); pandora.URL.push(e.target.pathname, true);
} else { } else {
window.top.open('/url=' + encodeURIComponent(e.target.href), '_blank'); window.open('/url=' + encodeURIComponent(e.target.href), '_blank');
} }
}; };
@ -274,7 +274,7 @@ pandora.createLinks = function($element) {
) { ) {
e.preventDefault(); e.preventDefault();
if (isExternalLink(e.target)) { if (isExternalLink(e.target)) {
window.top.open('/url=' + encodeURIComponent(e.target.href), '_blank'); window.open('/url=' + encodeURIComponent(e.target.href), '_blank');
} else { } else {
pandora.clickLink(e); pandora.clickLink(e);
} }