[Pkg-mozext-commits] [greasemonkey] 30/62: Fix for the context menu: aBrowser. getTabBrowser is not a function
David Prévot
taffit at moszumanska.debian.org
Sun Sep 13 22:10:22 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository greasemonkey.
commit b61dfd7206409c6ae689678b12d0033d9651b25a
Author: janekptacijarabaci <janekptacijarabaci at seznam.cz>
Date: Sat Aug 22 12:22:34 2015 +0200
Fix for the context menu: aBrowser. getTabBrowser is not a function
---
modules/remoteScript.js | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/modules/remoteScript.js b/modules/remoteScript.js
index 305d5a1..998a22b 100644
--- a/modules/remoteScript.js
+++ b/modules/remoteScript.js
@@ -452,7 +452,14 @@ RemoteScript.prototype.showSource = function(aBrowser) {
throw new Error('Script is not loaded!');
}
- var tabBrowser = aBrowser.getTabBrowser();
+ var tabBrowser;
+ try {
+ // The "new script" dialog
+ tabBrowser = aBrowser.getTabBrowser();
+ } catch (e) {
+ // The context menu
+ tabBrowser = aBrowser.ownerDocument.defaultView.gBrowser;
+ }
var tab = tabBrowser.addTab(ioService.newFileURI(this._scriptFile).spec);
tabBrowser.selectedTab = tab;
--
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