mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-04-10 22:23:36 +02:00
Simplifyification.
This commit is contained in:
@@ -350,7 +350,9 @@ var Abbreviations = Module("abbreviations", {
|
|||||||
command: this.name,
|
command: this.name,
|
||||||
arguments: [abbr.lhs],
|
arguments: [abbr.lhs],
|
||||||
literalArg: abbr.rhs,
|
literalArg: abbr.rhs,
|
||||||
options: callable(abbr.rhs) ? {"-javascript": null} : {}
|
options: {
|
||||||
|
"-javascript": abbr.rhs ? null : undefined
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for ([, abbr] in Iterator(abbreviations.user.merged))
|
for ([, abbr] in Iterator(abbreviations.user.merged))
|
||||||
if (abbr.modesEqual(modes))
|
if (abbr.modesEqual(modes))
|
||||||
|
|||||||
@@ -625,15 +625,13 @@ var Mappings = Module("mappings", {
|
|||||||
.map(function (hive) [
|
.map(function (hive) [
|
||||||
{
|
{
|
||||||
command: "map",
|
command: "map",
|
||||||
options: array([
|
options: {
|
||||||
hive.name !== "user" && ["-group", hive.name],
|
"-count": map.count ? null : undefined,
|
||||||
map.count && ["-count"],
|
"-description": map.description,
|
||||||
["-modes", uniqueModes(map.modes)],
|
"-group": hive.name == "user" ? undefined : hive.name,
|
||||||
["-description", map.description],
|
"-modes": uniqueModes(map.modes),
|
||||||
map.silent && ["-silent"]])
|
"-silent": map.silent ? null : undefined
|
||||||
|
},
|
||||||
.filter(util.identity)
|
|
||||||
.toObject(),
|
|
||||||
arguments: [map.names[0]],
|
arguments: [map.names[0]],
|
||||||
literalArg: map.rhs,
|
literalArg: map.rhs,
|
||||||
ignoreDefaults: true
|
ignoreDefaults: true
|
||||||
|
|||||||
@@ -628,9 +628,10 @@ var Styles = Module("Styles", {
|
|||||||
command: "style",
|
command: "style",
|
||||||
arguments: [style.sites.join(",")],
|
arguments: [style.sites.join(",")],
|
||||||
literalArg: style.css,
|
literalArg: style.css,
|
||||||
options: update(
|
options: {
|
||||||
hive.name == "user" ? {} : { "-group": hive.name },
|
"-group": hive.name == "user" ? undefined : hive.name,
|
||||||
style.name ? { "-name": style.name } : {})
|
"-name": style.name || undefined
|
||||||
|
}
|
||||||
})))
|
})))
|
||||||
.flatten().array
|
.flatten().array
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user