[Pkg-mozext-commits] [tabmixplus] 55/123: Add makeURI function, use decodeURI directly
David Prévot
taffit at moszumanska.debian.org
Wed Sep 17 21:16:26 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 1da1b45cb137b7ddec44711f96f8c4acbbdbe788
Author: onemen <tabmix.onemen at gmail.com>
Date: Sat Aug 30 06:33:36 2014 +0300
Add makeURI function, use decodeURI directly
---
modules/ContentClick.jsm | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/modules/ContentClick.jsm b/modules/ContentClick.jsm
index 2638809..8053010 100644
--- a/modules/ContentClick.jsm
+++ b/modules/ContentClick.jsm
@@ -443,7 +443,7 @@ let ContentClickInternal = {
var blocked = /tvguide.com|google|yahoo.com\/search|my.yahoo.com/.test(currentHref);
// youtube.com - added 2013-11-15
if (!blocked && /youtube.com/.test(currentHref) &&
- (!this.isGMEnabled() || this._window.decodeURI(href).indexOf("return false;") == -1))
+ (!this.isGMEnabled() || decodeURI(href).indexOf("return false;") == -1))
blocked = true;
else if (!blocked) {
// make sure external links in developer.mozilla.org open new tab
@@ -937,11 +937,11 @@ let ContentClickInternal = {
} catch (ex) { }
if (url.match(/^http/)) {
- url = fixedURI || Services.io.newURI(url, null, null);
+ url = fixedURI || makeURI(url);
// catch redirect
if (url.path.match(/^\/r\/\?http/))
- url = Services.io.newURI(url.path.substr("/r/?".length), null, null);
+ url = makeURI(url.path.substr("/r/?".length));
/* DONT DELETE
var host = url.hostPort.split(".");
//XXX while (host.length > 3) <---- this make problem to site like yahoo mail.yahoo.com ard.yahoo.com need
@@ -1013,4 +1013,8 @@ let ContentClickInternal = {
}
}
+function makeURI(aURL, aOriginCharset, aBaseURI) {
+ return Services.io.newURI(aURL, aOriginCharset, aBaseURI);
+}
+
TabmixContentClick.init();
--
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