[Pkg-mozext-commits] [tabmixplus] 41/123: Make sure external links in developer.mozilla.org open new tab when user set its preferences to do so.
David Prévot
taffit at moszumanska.debian.org
Wed Sep 17 21:16:25 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 0e08a697f3d4bd3075cf005be6c077fd9bce33fa
Author: onemen <tabmix.onemen at gmail.com>
Date: Mon Aug 25 14:30:58 2014 +0300
Make sure external links in developer.mozilla.org open new tab when user set its preferences to do so.
---
modules/ContentClick.jsm | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/modules/ContentClick.jsm b/modules/ContentClick.jsm
index e01ba09..2e8874d 100644
--- a/modules/ContentClick.jsm
+++ b/modules/ContentClick.jsm
@@ -438,6 +438,12 @@ let ContentClickInternal = {
if (!blocked && /youtube.com/.test(currentHref) &&
(!this.isGMEnabled() || this._window.decodeURI(href).indexOf("return false;") == -1))
blocked = true;
+ else if (!blocked) {
+ // make sure external links in developer.mozilla.org open new tab
+ let host = this._browser.currentURI.host;
+ blocked = host == "developer.mozilla.org" && linkNode.host != host &&
+ linkNode.classList.contains("external");
+ }
} catch (ex) {blocked = false;}
if (!blocked)
return;
--
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