Skip to content

Commit

Permalink
Override PrivateBrowsingUtils.isWindowPrivate() for search bar
Browse files Browse the repository at this point in the history
(for Firefox, part 1 for #129)
  • Loading branch information
Infocatcher committed Jan 12, 2014
1 parent b63f4c1 commit 8451ecb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -3120,17 +3120,17 @@ var windowsObserver = {
_log(key + "(): override to " + isPrivate);
return { value: isPrivate };
}
if(!prefs.get("patchDownloads"))
return false;
var stack = new Error().stack;
_dbgv && _log(key + "():\n" + stack);
if(
var fromSearchBar = stack.indexOf("@chrome://browser/content/search/search.xml:" != -1);
var fromDownloads = !fromSearchBar && prefs.get("patchDownloads") && (
stack.indexOf("@chrome://browser/content/downloads/downloads.js:") != -1
|| stack.indexOf("@resource://app/modules/DownloadsCommon.jsm:") != -1
|| stack.indexOf("@resource://app/components/DownloadsUI.js:") != -1
|| stack.indexOf("@resource://gre/modules/DownloadsCommon.jsm:") != -1
|| stack.indexOf("@resource://gre/components/DownloadsUI.js:") != -1
) try {
);
_dbgv && _log(key + "():\n" + stack);
if(fromSearchBar || fromDownloads) try {
var isPrivate = _this.isPrivateWindow(window.content);
_dbgv && _log(key + "(): return state of selected tab: " + isPrivate);
return { value: isPrivate };
Expand Down

0 comments on commit 8451ecb

Please sign in to comment.