1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-03 19:14:11 +01:00

More per-window private browsing fixes.

This commit is contained in:
Kris Maglione
2013-04-26 19:14:36 -07:00
parent da332e7c2c
commit f166f50780
5 changed files with 26 additions and 7 deletions

View File

@@ -121,12 +121,16 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
},
override: true
});
if (services.has("privateBrowsing"))
try {
var { ForgetAboutSite } = Cu.import("resource://gre/modules/ForgetAboutSite.jsm", {});
}
catch (e) {}
if (ForgetAboutSite)
this.addItem("host", {
description: "All data from the given host",
action: function (range, host) {
if (host)
services.privateBrowsing.removeDataFromDomain(host);
ForgetAboutSite.removeDataFromDomain(host);
}
});
this.addItem("sitesettings", {
@@ -595,7 +599,7 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
},
options: function initOptions(dactyl, modules) {
const options = modules.options;
if (services.has("privateBrowsing"))
if (services.has("privateBrowsing") && "privateBrowsingEnabled" in services.privateBrowsing)
options.add(["private", "pornmode"],
"Set the 'private browsing' option",
"boolean", false,