aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts/commands.coffee
diff options
context:
space:
mode:
authorStephen Blott2016-03-05 08:32:58 +0000
committerStephen Blott2016-03-05 08:32:58 +0000
commitfbf7791894cb2708774e8870f623a8211e3a0790 (patch)
tree7c13bc86eb8e658f9cbad5e3aad59173be81ec0c /background_scripts/commands.coffee
parent62359adda7bc38917de38e3fc794d37817fa05ed (diff)
downloadvimium-fbf7791894cb2708774e8870f623a8211e3a0790.tar.bz2
Simplify command-registry generation.
If we just use the name `background` instead of `isBackgroundCommand`, then we can simplify the building of registry entries. This is preparitory to adding a new registryEntry field: topFrame; initially just for the Vomnibar, but thereafter for other UI components.
Diffstat (limited to 'background_scripts/commands.coffee')
-rw-r--r--background_scripts/commands.coffee7
1 files changed, 1 insertions, 6 deletions
diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee
index 7429b6f0..c13a09ba 100644
--- a/background_scripts/commands.coffee
+++ b/background_scripts/commands.coffee
@@ -24,12 +24,7 @@ Commands =
return
options ||= {}
- @availableCommands[command] =
- description: description
- isBackgroundCommand: options.background
- passCountToFunction: options.passCountToFunction
- noRepeat: options.noRepeat
- repeatLimit: options.repeatLimit
+ @availableCommands[command] = extend options, description: description
mapKeyToCommand: ({ key, command, options }) ->
unless @availableCommands[command]