Skip to content
Permalink
Browse files

Use BrowserWindowTracker.getTopWindow() in Firefox 61+

  • Loading branch information...
Infocatcher committed Apr 21, 2018
1 parent 6810dcb commit 54a8587187033f22442b813264d223ae0711b607
Showing with 11 additions and 5 deletions.
  1. +11 −5 bootstrap.js
@@ -2533,15 +2533,21 @@ var privateTab = {
getNotPopupWindow: function(window, force) {
if(window.toolbar && window.toolbar.visible)
return window;
if(force || prefs.get("dontUseTabsInPopupWindows")) try {
var {RecentWindow} = Components.utils.import("resource:///modules/RecentWindow.jsm", {});
return RecentWindow.getMostRecentBrowserWindow({
if(!(force || prefs.get("dontUseTabsInPopupWindows")))
return null;
var jsm = {
"RecentWindow": "getMostRecentBrowserWindow",
"BrowserWindowTracker": "getTopWindow" // Firefox 61+, https://bugzilla.mozilla.org/show_bug.cgi?id=1034036
};
for(var name in jsm) try {
var o = Components.utils.import("resource:///modules/" + name + ".jsm", {})[name];
return o[jsm[name]]({
allowPopups: false
});
}
catch(e) {
if(RecentWindow || !this.isSeaMonkey)
Components.utils.reportError(e);
o && Components.utils.reportError(e);
_log("Failed to use " + name + "." + jsm[name] + "()");
}
return null;
},

0 comments on commit 54a8587

Please sign in to comment.
You can’t perform that action at this time.