[Pkg-mozext-commits] [wot] 103/226: Fixed #46 Settings page doesn't open because of additional query-params
David Prévot
taffit at moszumanska.debian.org
Fri May 1 00:35:40 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository wot.
commit 820ab989df7eb1cb3df8d24792ba33569859b74f
Author: Sergey Andryukhin <sorgoz at yandex.com>
Date: Wed Aug 7 11:34:34 2013 +0300
Fixed #46 Settings page doesn't open because of additional query-params
---
content/config.js | 6 ++++--
content/core.js | 4 +++-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/content/config.js b/content/config.js
index 1a6c922..3713c2d 100644
--- a/content/config.js
+++ b/content/config.js
@@ -232,8 +232,10 @@ const WOT_BLOCK_BLOCKED = "chrome://wot/locale/blocked.html";
const WOT_PREF_PATH = "settings/";
const WOT_PREF_FORWARD_TAB_MATCH = 7;
-const WOT_PREF_FORWARD = /^http(s)?\:\/\/(www\.|beta\.)?mywot\.com\/([^\/]{2}(-[^\/]+)?\/)?(settings|update)(\/([^\/]+))?\/?$/;
-const WOT_PREF_TRIGGER = /^http(s)?\:\/\/(www\.|beta\.)?mywot\.com\/([^\/]{2}(-[^\/]+)?\/)?(settings|update)\/.+/;
+const WOT_PREF_FORWARD_TAB_BASE = 1;
+const WOT_PREF_FORWARD = /^(http(s)?\:\/\/(.+\.)?mywot\.com)\/([^\/]{2}(-[^\/]+)?\/)?(settings|update)(\/([^\/]+))?\/?(\?.+)?$/;
+const WOT_PREF_TRIGGER = /^(http(s)?\:\/\/(.+\.)?mywot\.com)\/([^\/]{2}(-[^\/]+)?\/)?(settings|update)\/.+/;
+
const WOT_PREF = "weboftrust.";
diff --git a/content/core.js b/content/core.js
index f4b7097..f6026c3 100644
--- a/content/core.js
+++ b/content/core.js
@@ -579,7 +579,9 @@ var wot_core =
if (match) {
var section = match[WOT_PREF_FORWARD_TAB_MATCH];
- getBrowser().loadURIWithFlags(wot_url.getprefurl(section),
+ var base = (match[WOT_PREF_FORWARD_TAB_BASE] + "/settings") || WOT_PREF_PATH;
+
+ getBrowser().loadURIWithFlags(wot_url.getprefurl(section, base),
Components.interfaces.nsIWebNavigation
.LOAD_FLAGS_BYPASS_HISTORY, null, null);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/wot.git
More information about the Pkg-mozext-commits
mailing list