diff options
author | Doug Kearns <dougkearns@gmail.com> | 2007-11-09 11:23:43 +0000 |
---|---|---|
committer | Doug Kearns <dougkearns@gmail.com> | 2007-11-09 11:23:43 +0000 |
commit | 2cf6003d0f6f848ed14381346982240a518f3b83 (patch) | |
tree | d7968aa03ae83ab18c4b6139e5708f2fd5317b78 | |
parent | 3d9c6c09308d25938ce9fd9f07f82584ae4b097e (diff) | |
download | pentadactyl-2cf6003d0f6f848ed14381346982240a518f3b83.tar.gz |
add a validator for the 'activate' option
-rw-r--r-- | content/options.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/content/options.js b/content/options.js index 4d680485..cce3b61c 100644 --- a/content/options.js +++ b/content/options.js @@ -436,7 +436,8 @@ vimperator.Options = function() //{{{ "<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>" + "</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", |