mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 12:42:26 +01:00
add a validator for the 'activate' option
This commit is contained in:
@@ -436,7 +436,8 @@ vimperator.Options = function() //{{{
|
|||||||
"<li><b>tabopen</b>: <code class=\"command\">:tabopen[!]</code> command</li>" +
|
"<li><b>tabopen</b>: <code class=\"command\">:tabopen[!]</code> command</li>" +
|
||||||
"<li><b>paste</b>: <code class=\"mapping\">P</code> and <code class=\"mapping\">gP</code> mappings</li>" +
|
"<li><b>paste</b>: <code class=\"mapping\">P</code> and <code class=\"mapping\">gP</code> mappings</li>" +
|
||||||
"</ul>",
|
"</ul>",
|
||||||
default_value: "homepage,quickmark,tabopen,paste"
|
default_value: "homepage,quickmark,tabopen,paste",
|
||||||
|
validator: function(value) { return value.split(",").every(function(item) { return /^(homepage|quickmark|tabopen|paste|)$/.test(item); }); }
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
this.add(new vimperator.Option(["complete", "cpt"], "charlist",
|
this.add(new vimperator.Option(["complete", "cpt"], "charlist",
|
||||||
|
|||||||
Reference in New Issue
Block a user