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:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user