aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts
diff options
context:
space:
mode:
authorStephen Blott2016-03-05 08:32:58 +0000
committerStephen Blott2016-03-05 08:32:58 +0000
commitfbf7791894cb2708774e8870f623a8211e3a0790 (patch)
tree7c13bc86eb8e658f9cbad5e3aad59173be81ec0c /content_scripts
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 'content_scripts')
-rw-r--r--content_scripts/vimium_frontend.coffee2
1 files changed, 1 insertions, 1 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee
index 0ae3d229..71535b19 100644
--- a/content_scripts/vimium_frontend.coffee
+++ b/content_scripts/vimium_frontend.coffee
@@ -120,7 +120,7 @@ class NormalMode extends KeyHandlerMode
if registryEntry.command.startsWith "Vomnibar."
chrome.runtime.sendMessage
handler: "sendMessageToFrames", message: {name: "openVomnibar", sourceFrameId: frameId, registryEntry}
- else if registryEntry.isBackgroundCommand
+ else if registryEntry.background
chrome.runtime.sendMessage {handler: "runBackgroundCommand", frameId, registryEntry, count}
else if registryEntry.passCountToFunction
Utils.invokeCommandString registryEntry.command, [count]