forked from 0x2620/pandora
use window.top.open to fix links inside iframes
This commit is contained in:
parent
658348818c
commit
d19050756f
1 changed files with 2 additions and 2 deletions
|
@ -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.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();
|
e.preventDefault();
|
||||||
if (isExternalLink(e.target)) {
|
if (isExternalLink(e.target)) {
|
||||||
window.open('/url=' + encodeURIComponent(e.target.href), '_blank');
|
window.top.open('/url=' + encodeURIComponent(e.target.href), '_blank');
|
||||||
} else {
|
} else {
|
||||||
pandora.clickLink(e);
|
pandora.clickLink(e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue