[Pkg-mozext-commits] [tabmixplus] 15/22: [e10s] Don't open new tab when user click on link to 'Report this review ' in addons.mozilla.org. we need this hack only remote tab. in non-remote tab the site prevent the default event.

David Prévot taffit at moszumanska.debian.org
Sun Jan 4 16:46:36 UTC 2015


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

taffit pushed a commit to branch master
in repository tabmixplus.

commit 0c3f683fe36a979c243e4f4381bd36c46a287dad
Author: onemen <tabmix.onemen at gmail.com>
Date:   Sun Dec 28 11:18:57 2014 +0200

    [e10s] Don't open new tab when user click on link to 'Report this review ' in addons.mozilla.org. we need this hack only remote tab. in non-remote tab the site prevent the default event.
---
 modules/ContentClick.jsm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/modules/ContentClick.jsm b/modules/ContentClick.jsm
index 9bec811..abedbec 100644
--- a/modules/ContentClick.jsm
+++ b/modules/ContentClick.jsm
@@ -588,8 +588,13 @@ var ContentClickInternal = {
       if (node.className.indexOf("__noscriptPlaceholder__") > -1)
         return true;
 
+      let className = node.className.toLowerCase();
       // need to find a way to work here only on links
-      if (/button/.test(node.className.toLowerCase()))
+      if (/button/.test(className))
+        return true;
+
+      let isAMO = /^(http|https):\/\/addons.mozilla.org/.test(this._data.currentURL);
+      if (isAMO && /flag-review/.test(className))
         return true;
     }
 

-- 
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