mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-06 20:14:11 +01:00
Add Options#remove.
This commit is contained in:
@@ -1269,6 +1269,21 @@ function Options() //{{{
|
|||||||
return ret;
|
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. */
|
/** @property {Object} The options store. */
|
||||||
get store() storage.options,
|
get store() storage.options,
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user