[Pkg-mozext-commits] [greasemonkey] 14/45: Fix reference errors in GM_openInTab and remove GM_windowForTab.
David Prévot
taffit at moszumanska.debian.org
Mon Nov 3 20:59:19 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository greasemonkey.
commit 3f512a110fd5893c62073eee16101bbf0bed190b
Author: Ventero <ventero at ventero.de>
Date: Sat Sep 27 21:50:13 2014 +0200
Fix reference errors in GM_openInTab and remove GM_windowForTab.
This was broken by d2822b79eaec63ab2f8aa7646a82bdf3350a312e.
---
content/third-party/mpl-utils.js | 11 -----------
modules/miscapis.js | 6 +++---
2 files changed, 3 insertions(+), 14 deletions(-)
diff --git a/content/third-party/mpl-utils.js b/content/third-party/mpl-utils.js
index 606ea00..eabbd07 100644
--- a/content/third-party/mpl-utils.js
+++ b/content/third-party/mpl-utils.js
@@ -55,14 +55,3 @@ function GM_openFolder(aFile) {
}
}
}
-
-function GM_windowForTab(aTab, aBrowser) {
- var browser = aBrowser || gBrowser;
- // Source:
- // http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.js#4448
- return browser
- .getBrowserForTab(aTab)
- .docShell
- .QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIDOMWindow);
-}
diff --git a/modules/miscapis.js b/modules/miscapis.js
index 66ea879..c4056b2 100644
--- a/modules/miscapis.js
+++ b/modules/miscapis.js
@@ -306,10 +306,10 @@ function GM_openInTab(safeContentWin, url, aLoadInBackground) {
browser.getBrowserIndexForDocument(safeContentWin.top.document)];
var newTab = browser.loadOneTab(
uri.spec, {'inBackground': aLoadInBackground});
- var newWin = GM_windowForTab(newTab, browser);
+ var newWin = browser.getBrowserForTab(newTab).contentWindow;
- var afterCurrent = Cc["@mozilla.org/preferences-service;1"]
- .getService(Ci.nsIPrefService)
+ var afterCurrent = Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefService)
.getBranch("browser.tabs.")
.getBoolPref("insertRelatedAfterCurrent");
if (afterCurrent) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/greasemonkey.git
More information about the Pkg-mozext-commits
mailing list