From d19050756fcd2ed098b498dbd93d66869920a992 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Mon, 23 Dec 2013 14:13:32 +0000 Subject: [PATCH] use window.top.open to fix links inside iframes --- static/js/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/utils.js b/static/js/utils.js index 1661077a..81a66740 100644 --- a/static/js/utils.js +++ b/static/js/utils.js @@ -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); }