Skip to content

Commit

Permalink
Hack for browser.newtab.preload = true in Firefox 54+
Browse files Browse the repository at this point in the history
Force override, if PrivateBrowsingUtils.isWindowPrivate() call contains our openNewPrivateTab() in stack
(#252)
  • Loading branch information
Infocatcher committed Apr 8, 2017
1 parent 070f898 commit 7ef72ac
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -4269,9 +4269,12 @@ var privateTab = {
if(
(
stack.indexOf("\nprivateTab.openNewPrivateTab@") != -1 // Firefox 52
|| stack.indexOf("\nopenNewPrivateTab@") != -1 // Firefox 53
|| stack.indexOf("\nopenNewPrivateTab@") != -1 // Firefox 53+
)
&& (
stack.indexOf("\n_linkBrowserToTab@chrome://browser/content/tabbrowser.xml:") != -1
|| (_this.platformVersion >= 54 && prefs.getPref("browser.newtab.preload"))
)
&& stack.indexOf("\n_linkBrowserToTab@chrome://browser/content/tabbrowser.xml:") != -1
) {
_log(key + "(): looks like privateTab.openNewPrivateTab() + preloaded about:newtab, override to true");
return { value: true };
Expand Down

0 comments on commit 7ef72ac

Please sign in to comment.