[Pkg-mozext-commits] [tabmixplus] 31/48: Follow up bug 1326520 - Rename nsIURI.path to pathQueryRef
David Prévot
taffit at moszumanska.debian.org
Sun Aug 20 03:14:37 UTC 2017
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository tabmixplus.
commit 6bfcbdc5b08476a8aa2437fa3f65444582d44d4f
Author: onemen <tabmix.onemen at gmail.com>
Date: Sun Aug 13 14:25:20 2017 +0300
Follow up bug 1326520 - Rename nsIURI.path to pathQueryRef
---
chrome/content/session/sessionStore.js | 3 ++-
modules/ContentClick.jsm | 6 ++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/chrome/content/session/sessionStore.js b/chrome/content/session/sessionStore.js
index c37555a..820ce62 100644
--- a/chrome/content/session/sessionStore.js
+++ b/chrome/content/session/sessionStore.js
@@ -369,8 +369,9 @@ var TMP_ClosedTabs = {
url = title = "about:blank";
else {
try {
+ const pathProp = TabmixSvc.version(570) ? "pathQueryRef" : "path";
url = _uri.scheme == "about" ? _uri.spec :
- _uri.scheme + "://" + _uri.hostPort + _uri.path;
+ _uri.scheme + "://" + _uri.hostPort + _uri[pathProp];
} catch (e) {
url = title;
}
diff --git a/modules/ContentClick.jsm b/modules/ContentClick.jsm
index 54f6a03..2a6b807 100644
--- a/modules/ContentClick.jsm
+++ b/modules/ContentClick.jsm
@@ -895,7 +895,8 @@ ContentClickInternal = {
let current = this._data.currentURL.toLowerCase();
let youtube = /www\.youtube\.com\/watch\?v=/;
let isYoutube = _href => youtube.test(current) && youtube.test(_href);
- let isSamePath = (_href, att) => makeURI(current).path.split(att)[0] == makeURI(_href).path.split(att)[0];
+ const pathProp = TabmixSvc.version(570) ? "pathQueryRef" : "path";
+ let isSamePath = (_href, att) => makeURI(current)[pathProp].split(att)[0] == makeURI(_href)[pathProp].split(att)[0];
let isSame = (_href, att) => current.split(att)[0] == _href.split(att)[0];
if (hrefFromOnClick) {
@@ -1120,7 +1121,8 @@ ContentClickInternal = {
url = fixedURI || makeURI(url);
// catch redirect
- const path = url.path;
+ const pathProp = TabmixSvc.version(570) ? "pathQueryRef" : "path";
+ const path = url[pathProp];
if (path.match(/^\/r\/\?http/)) {
url = fixupURI(path.substr("/r/?".length));
} else if (path.match(/^.*\?url=http/)) {
--
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