summaryrefslogtreecommitdiff
path: root/common/content
diff options
context:
space:
mode:
authorDoug Kearns <dougkearns@gmail.com>2009-08-29 20:14:56 +1000
committerDoug Kearns <dougkearns@gmail.com>2009-09-04 12:30:23 +1000
commit3474036fad68055f5ed466a919852cc8e5cc9c55 (patch)
treee4a3014b970c9dc552783574b006f6fb5283f181 /common/content
parent5116502bf98519d7d30d9cca078fe162d5e3738e (diff)
downloadpentadactyl-3474036fad68055f5ed466a919852cc8e5cc9c55.tar.gz
Add Options#remove.
Diffstat (limited to 'common/content')
-rw-r--r--common/content/options.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/common/content/options.js b/common/content/options.js
index bc5f8455..dfb2c9bc 100644
--- a/common/content/options.js
+++ b/common/content/options.js
@@ -1269,6 +1269,21 @@ function Options() //{{{
return ret;
},
+ /**
+ * Remove the option with matching <b>name</b>.
+ *
+ * @param {string} name The name of the option to remove. This can be
+ * any of the options's names.
+ */
+ remove: function (name)
+ {
+ for each (let option in optionHash)
+ {
+ if (option.hasName(name))
+ delete optionHash[option.name];
+ }
+ },
+
/** @property {Object} The options store. */
get store() storage.options,