use window.top.open to fix links inside iframes

This commit is contained in:
j 2013-12-23 14:13:32 +00:00
parent 658348818c
commit d19050756f

View file

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