diff options
| author | ilya | 2010-02-26 23:13:52 -0800 |
|---|---|---|
| committer | ilya | 2010-02-26 23:13:52 -0800 |
| commit | 2dac5378e1bae571fc3ba539e262740186e4791c (patch) | |
| tree | 009b8f137ecdc7932b81c3ba7d3b6f9a7d05465c /options.html | |
| parent | 17ce20f492ca64ab9c31a0962edcb8e696790a9b (diff) | |
| download | vimium-2dac5378e1bae571fc3ba539e262740186e4791c.tar.bz2 | |
Key Mapping - Reparse the mappings whenever a new value is saved in the options page.
Diffstat (limited to 'options.html')
| -rw-r--r-- | options.html | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/options.html b/options.html index 5fc965a3..3beb3331 100644 --- a/options.html +++ b/options.html @@ -69,6 +69,11 @@ var editableFields = ["scrollStepSize", "defaultZoomLevel", "excludedUrls", "linkHintCharacters", "userDefinedLinkHintCss", "keyMappings"]; + var postSaveHooks = { + "keyMappings": function (value) { + chrome.extension.getBackgroundPage().parseCustomKeyMappings(value); } + }; + function initializeOptions() { populateOptions(); for (var i = 0; i < editableFields.length; i++) @@ -98,6 +103,8 @@ localStorage[fieldName] = fieldValue; $(fieldName).value = fieldValue; $(fieldName).setAttribute("savedValue", fieldValue); + + if (postSaveHooks[fieldName]) { postSaveHooks[fieldName](fieldValue); } } $("saveOptions").disabled = true; } |
