[Pkg-mozext-commits] [tabmixplus] 09/22: Link with "#" to the same page open new tab when currentURL is not in lower case (openTabfromLink)
David Prévot
taffit at moszumanska.debian.org
Sun Jan 4 16:46:35 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 5a9745f1d76d903279fc705a89e6cc66df2f82cc
Author: onemen <tabmix.onemen at gmail.com>
Date: Thu Dec 25 17:19:24 2014 +0200
Link with "#" to the same page open new tab when currentURL is not in lower case (openTabfromLink)
---
modules/ContentClick.jsm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/modules/ContentClick.jsm b/modules/ContentClick.jsm
index 5bc2451..9bec811 100644
--- a/modules/ContentClick.jsm
+++ b/modules/ContentClick.jsm
@@ -840,8 +840,9 @@ var ContentClickInternal = {
if (!/^(http|about)/.test(hrefFromOnClick || href))
return null;
+ var currentURL = this._data.currentURL.toLowerCase().split("#")[0];
if (hrefFromOnClick)
- return this._data.currentURL.split("#")[0] != hrefFromOnClick.split("#")[0];
+ return currentURL != hrefFromOnClick.toLowerCase().split("#")[0];
if (href)
href = href.toLowerCase();
@@ -853,7 +854,7 @@ var ContentClickInternal = {
return null;
else
// when the links target is in the same page don't open new tab
- return this._data.currentURL.split("#")[0] != href.split("#")[0];
+ return currentURL != href.split("#")[0];
return null;
},
--
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