diff options
| author | Stephen Blott | 2016-02-20 09:16:07 +0000 |
|---|---|---|
| committer | Stephen Blott | 2016-02-20 09:16:07 +0000 |
| commit | 61ce82be4acae20562bb2ccb93ff64772ba553c1 (patch) | |
| tree | 51c1c5f29b1b0349ed0587fdaf83dda3d01b60df /content_scripts | |
| parent | e6200864be1bad085ae80e0a0c51d077ca1289a5 (diff) | |
| download | vimium-61ce82be4acae20562bb2ccb93ff64772ba553c1.tar.bz2 | |
Refactor command-option parsing.
When we introduced command options (for mapping keys to custom-search
engines), the parsing was done in the Vomnibar code.
This moves the parsing to `commands.coffee`, which is where it should
always have been.
This is a preliminary step with a view to adding a new `count` command
option.
Diffstat (limited to 'content_scripts')
| -rw-r--r-- | content_scripts/vomnibar.coffee | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/content_scripts/vomnibar.coffee b/content_scripts/vomnibar.coffee index 6c08ce92..55a46777 100644 --- a/content_scripts/vomnibar.coffee +++ b/content_scripts/vomnibar.coffee @@ -10,18 +10,7 @@ Vomnibar = options = {} searchEngines = Settings.get("searchEngines") ? "" SearchEngines.refreshAndUse searchEngines, (engines) -> - for option in registryEntry.options - [ key, value ] = option.split "=" - switch key - when "keyword" - if value? and engines[value]? - options.keyword = value - else - console.log "Vimium configuration error: no such custom search engine: #{option}." - else - console.log "Vimium configuration error: unused flag: #{option}." - - callback? options + callback? registryEntry.options # sourceFrameId here (and below) is the ID of the frame from which this request originates, which may be different # from the current frame. |
