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

Add wildanchor option.

This commit is contained in:
Kris Maglione
2010-09-23 15:15:09 -04:00
parent db2a6ba0a3
commit 2f30daa09e
6 changed files with 37 additions and 13 deletions

View File

@@ -382,11 +382,11 @@ const Option = Class("Option", {
stringlist: function (k) this.values.indexOf(k) >= 0,
get charlist() this.stringlist,
regexlist: function (k) {
regexlist: function (k, default_) {
for (let re in values(this.values))
if (re.test(k))
return re.result;
return null;
return arguments.length > 1 ? default_ : null;
},
get regexmap() this.regexlist
},