mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-16 17:35:46 +01:00
Allow :setcomm /dev/null <(js -Cv180 options.js |& grep .) all&
This commit is contained in:
@@ -937,8 +937,13 @@ const Options = Module("options", {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (name == "all" && reset)
|
if (name == "all" && reset)
|
||||||
// TODO: Why? --djk
|
commandline.input("Warning: Resetting all preferences may make " + config.hostApplication + " unusable. Continue (yes/[no]): ",
|
||||||
liberator.echoerr("You can't reset all options, it could make " + config.hostApplication + " unusable.");
|
function (resp) {
|
||||||
|
if (resp == "yes")
|
||||||
|
for (let pref in values(options.allPrefs()))
|
||||||
|
options.resetPref(pref);
|
||||||
|
},
|
||||||
|
{ promptHighlight: "WarningMsg" });
|
||||||
else if (name == "all")
|
else if (name == "all")
|
||||||
options.listPrefs(onlyNonDefault, "");
|
options.listPrefs(onlyNonDefault, "");
|
||||||
else if (reset)
|
else if (reset)
|
||||||
|
|||||||
@@ -782,6 +782,9 @@ const Util = Module("util", {
|
|||||||
isinstance: function isinstance(obj) {
|
isinstance: function isinstance(obj) {
|
||||||
return Object.prototype.toString.call(obj) == "[object Array]";
|
return Object.prototype.toString.call(obj) == "[object Array]";
|
||||||
},
|
},
|
||||||
|
|
||||||
|
toString: function () this.__proto__.toString(),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts an array to an object. As in lisp, an assoc is an
|
* Converts an array to an object. As in lisp, an assoc is an
|
||||||
* array of key-value pairs, which maps directly to an object,
|
* array of key-value pairs, which maps directly to an object,
|
||||||
|
|||||||
Reference in New Issue
Block a user