1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-28 15:05:46 +01:00

Better option list filtering.

This commit is contained in:
Kris Maglione
2013-04-04 23:53:00 -07:00
parent e973f91e3d
commit 0a31fa5cab
3 changed files with 50 additions and 36 deletions

View File

@@ -854,6 +854,11 @@ var Options = Module("options", {
function opts(opt) {
for (let opt in Iterator(this)) {
if (filter && !filter(opt))
continue;
if (!(opt.scope & scope))
continue;
let option = {
__proto__: opt,
isDefault: opt.isDefault,
@@ -862,11 +867,6 @@ var Options = Module("options", {
value: []
};
if (filter && !filter(opt))
continue;
if (!(opt.scope & scope))
continue;
if (opt.type == "boolean") {
if (!opt.value)
option.pre = "no";