mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-27 01:15:47 +01:00
Don't prompt on :san -h foo all
This commit is contained in:
@@ -407,6 +407,9 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
|
|||||||
function (args) {
|
function (args) {
|
||||||
dactyl.assert(!modules.options['private'], _("command.sanitize.privateMode"));
|
dactyl.assert(!modules.options['private'], _("command.sanitize.privateMode"));
|
||||||
|
|
||||||
|
if (args["-host"] && !args.length)
|
||||||
|
args[0] = "all";
|
||||||
|
|
||||||
let timespan = args["-timespan"] || modules.options["sanitizetimespan"];
|
let timespan = args["-timespan"] || modules.options["sanitizetimespan"];
|
||||||
|
|
||||||
let range = Range();
|
let range = Range();
|
||||||
@@ -416,8 +419,6 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
|
|||||||
: (timespan[0] == "s" ? sanitizer.sessionStart : null);
|
: (timespan[0] == "s" ? sanitizer.sessionStart : null);
|
||||||
|
|
||||||
let items = args.slice();
|
let items = args.slice();
|
||||||
if (args["-host"] && !args.length)
|
|
||||||
args[0] = "all";
|
|
||||||
|
|
||||||
if (args.bang) {
|
if (args.bang) {
|
||||||
dactyl.assert(args.length == 0, _("error.trailingCharacters"));
|
dactyl.assert(args.length == 0, _("error.trailingCharacters"));
|
||||||
@@ -441,7 +442,7 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
|
|||||||
sanitizer.sanitize(items, range);
|
sanitizer.sanitize(items, range);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (items.indexOf("all") >= 0)
|
if (items.indexOf("all") >= 0 && !args["-host"])
|
||||||
modules.commandline.input(_("sanitize.prompt.deleteAll") + " ",
|
modules.commandline.input(_("sanitize.prompt.deleteAll") + " ",
|
||||||
function (resp) {
|
function (resp) {
|
||||||
if (resp.match(/^y(es)?$/i)) {
|
if (resp.match(/^y(es)?$/i)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user