1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 20:32:25 +01:00

Move util.identity to the base module.

Most other functions of its ilk live there.
This commit is contained in:
Doug Kearns
2015-06-11 03:10:16 +10:00
parent 6ca1cc3d08
commit 59613afb27
20 changed files with 49 additions and 46 deletions

View File

@@ -166,7 +166,7 @@ var CommandWidgets = Class("CommandWidgets", {
this.elements[obj.name] = obj;
function get(prefix, map, id) {
return (obj.getElement || util.identity)(map[id] || document.getElementById(prefix + id));
return (obj.getElement || identity)(map[id] || document.getElementById(prefix + id));
}
this.active.__defineGetter__(obj.name, () => this.activeGroup[obj.name][obj.name]);
@@ -200,7 +200,7 @@ var CommandWidgets = Class("CommandWidgets", {
else {
highlight.highlightNode(elem,
(val[0] != null ? val[0] : obj.defaultGroup)
.split(/\s/).filter(util.identity)
.split(/\s/).filter(identity)
.map(g => g + " " + nodeSet.group + g)
.join(" "));
elem.value = val[1];