[Pkg-mozext-commits] [tabmixplus] 21/27: Follow up bug 1031264 - make opening links in new {tabs, windows} honor rel="noreferrer"

David Prévot taffit at moszumanska.debian.org
Fri Dec 26 01:04:31 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository tabmixplus.

commit 65d87765d613914b9408754e3624a58901ccc800
Author: onemen <tabmix.onemen at gmail.com>
Date:   Thu Dec 18 19:21:44 2014 +0200

    Follow up bug 1031264 - make opening links in new {tabs,windows} honor rel="noreferrer"
---
 chrome/content/links/contentLinks.js | 10 +++++-----
 chrome/content/minit/tablib.js       |  6 +++---
 modules/ContentClick.jsm             |  6 +++---
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/chrome/content/links/contentLinks.js b/chrome/content/links/contentLinks.js
index fbc416d..ea30d19 100644
--- a/chrome/content/links/contentLinks.js
+++ b/chrome/content/links/contentLinks.js
@@ -25,11 +25,11 @@ Tabmix.contentAreaClick = {
       'if (where == "tab" || where == "tabshifted") {\n' +
       '        let doc = event.target.ownerDocument;\n' +
       '        let _url = Tabmix.isVersion(190) ? href : url;\n' +
-      '        openLinkIn(_url, where,\n' +
-      '             {referrerURI: doc.documentURIObject,\n' +
-      '              charset: doc.characterSet,\n' +
-      '              initiatingDoc: doc,\n' +
-      '              suppressTabsOnFileDownload: suppressTabsOnFileDownload});\n' +
+      '        let params = { charset: doc.characterSet, initiatingDoc: doc,\n' +
+      '                       suppressTabsOnFileDownload: suppressTabsOnFileDownload };\n' +
+      '        if (!Tabmix.isVersion(370) || !BrowserUtils.linkHasNoReferrer(linkNode))\n' +
+      '          params.referrerURI = doc.documentURIObject;\n'+
+      '        openLinkIn(_url, where, params);\n' +
       '      }\n' +
       '      else\n        $&'
     )._replace(
diff --git a/chrome/content/minit/tablib.js b/chrome/content/minit/tablib.js
index 52af308..3556b2a 100644
--- a/chrome/content/minit/tablib.js
+++ b/chrome/content/minit/tablib.js
@@ -946,9 +946,9 @@ var tablib = {
     }
 
     Tabmix.changeCode(nsContextMenu.prototype, "nsContextMenu.prototype.openLinkInTab")._replace(
-      'charset: doc.characterSet,',
-      '$&\n                 ' +
-      'inBackground: !Services.prefs.getBoolPref("browser.tabs.loadInBackground"),'
+      /allowMixedContent:|charset:/,
+      'inBackground: !Services.prefs.getBoolPref("browser.tabs.loadInBackground"),\n' +
+      '      $&'
     ).toCode(false, Tabmix.originalFunctions, "openInverseLink");
 
     gBrowser.openInverseLink = function (aTab) {
diff --git a/modules/ContentClick.jsm b/modules/ContentClick.jsm
index cc7c739..87a0489 100644
--- a/modules/ContentClick.jsm
+++ b/modules/ContentClick.jsm
@@ -109,9 +109,9 @@ let ContentClickInternal = {
       'where == "current"',
       '!json.tabmix && where == "current" || where == "default"'
     )._replace(
-      'referrerURI: browser.documentURI,',
-      '$&\n' +
-      '                                          suppressTabsOnFileDownload: suppressTabsOnFileDownload || false,'
+      'charset:',
+      'suppressTabsOnFileDownload: suppressTabsOnFileDownload || false,\n' +
+      '                   $&'
     ).toCode();
   },
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git



More information about the Pkg-mozext-commits mailing list