diff options
| -rw-r--r-- | background_scripts/commands.coffee | 10 | ||||
| -rw-r--r-- | content_scripts/vomnibar.coffee | 10 | 
2 files changed, 10 insertions, 10 deletions
| diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee index 1714ae56..fa5354df 100644 --- a/background_scripts/commands.coffee +++ b/background_scripts/commands.coffee @@ -24,13 +24,13 @@ Commands =        noRepeat: options.noRepeat        repeatLimit: options.repeatLimit -  mapKeyToCommand: ({ key, command, extras }) -> +  mapKeyToCommand: ({ key, command, options }) ->      unless @availableCommands[command]        console.log command, "doesn't exist!"        return -    extras ?= [] -    @keyToCommandRegistry[key] = extend { command, extras }, @availableCommands[command] +    options ?= [] +    @keyToCommandRegistry[key] = extend { command, options }, @availableCommands[command]    # Lower-case the appropriate portions of named keys.    # @@ -51,11 +51,11 @@ Commands =          tokens = line.replace(/\s+$/, "").split /\s+/          switch tokens[0]            when "map" -            [ _, key, command, extras... ] = tokens +            [ _, key, command, options... ] = tokens              if command? and @availableCommands[command]                key = @normalizeKey key                console.log "Mapping", key, "to", command -              @mapKeyToCommand { key, command, extras } +              @mapKeyToCommand { key, command, options }            when "unmap"              if tokens.length == 2 diff --git a/content_scripts/vomnibar.coffee b/content_scripts/vomnibar.coffee index 06b546a6..4bd8e8fd 100644 --- a/content_scripts/vomnibar.coffee +++ b/content_scripts/vomnibar.coffee @@ -6,20 +6,20 @@ Vomnibar =    # Parse any additional options from the command's registry entry.  Currently, this only includes a flag of    # the form "keyword=X", for direct activation of a custom search engine. -  parseRegistryEntry: (registryEntry = { extras: [] }, callback = null) -> +  parseRegistryEntry: (registryEntry = { options: [] }, callback = null) ->      options = {}      searchEngines = settings.get("searchEngines") ? ""      SearchEngines.refreshAndUse searchEngines, (engines) -> -      for extra in registryEntry.extras -        [ key, value ] = extra.split "=" +      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: #{extra}." +              console.log "Vimium configuration error: no such custom search engine: #{option}."            else -              console.log "Vimium configuration error: unused flag: #{extra}." +              console.log "Vimium configuration error: unused flag: #{option}."        callback? options | 
