From fbf7791894cb2708774e8870f623a8211e3a0790 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sat, 5 Mar 2016 08:32:58 +0000 Subject: 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. --- background_scripts/commands.coffee | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'background_scripts') 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] -- cgit v1.2.3