# HG changeset patch # User Guido Berhoerster # Date 1546462417 -3600 # Node ID f0c4a458869c99ab5cf042a6e4010295196013fa # Parent da483ce3832d822507a8943b42966bb178108052 Open links within feed content in a new tab Open links within feed content in a new non-sandboxed tab rather than in the sandboxed iframe itself. diff -r da483ce3832d -r f0c4a458869c js/feed-preview.js --- a/js/feed-preview.js Fri Dec 28 12:27:16 2018 +0100 +++ b/js/feed-preview.js Wed Jan 02 21:53:37 2019 +0100 @@ -87,6 +87,10 @@ stylesheetElement.href = browser.runtime.getURL('web_resources/style/entry-content.css'); contentDocument.head.appendChild(stylesheetElement); + // open links in a new tab rather than within the iframe + for (let linkElement of contentDocument.links) { + linkElement.target = '_blank'; + } contentElement.srcdoc = new XMLSerializer() .serializeToString(contentDocument); contentElement.title = entry.title; diff -r da483ce3832d -r f0c4a458869c web_resources/feed-preview.xhtml --- a/web_resources/feed-preview.xhtml Fri Dec 28 12:27:16 2018 +0100 +++ b/web_resources/feed-preview.xhtml Wed Jan 02 21:53:37 2019 +0100 @@ -26,7 +26,8 @@

-