aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts
diff options
context:
space:
mode:
authorStephen Blott2016-02-27 14:44:34 +0000
committerStephen Blott2016-03-05 05:37:40 +0000
commit3f63ceb19046157692eac9e9a13486af7e50a57e (patch)
tree53825a90da1064da8eed3894bad8e75ea2cfa03c /content_scripts
parent34b1fb0f4e2ce1696c17e703d0bc43463355d6ba (diff)
downloadvimium-3f63ceb19046157692eac9e9a13486af7e50a57e.tar.bz2
Key bindings; partially functioning w/ backgound commands.
Diffstat (limited to 'content_scripts')
-rw-r--r--content_scripts/vimium_frontend.coffee7
1 files changed, 5 insertions, 2 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee
index b46175fb..26942a30 100644
--- a/content_scripts/vimium_frontend.coffee
+++ b/content_scripts/vimium_frontend.coffee
@@ -117,11 +117,14 @@ window.initializeModes = ->
@setKeyMapping changes.normalModeKeyStateMapping.newValue
commandHandler: (registryEntry, count) ->
+ count *= registryEntry.options.count ? 1
+ count = 1 if registryEntry.noRepeat
+ # TODO: Repeat limit.
# TODO: Special handling of Vomnibar.
+ # TODO: Fix passKeys.
if registryEntry.isBackgroundCommand
- true # Not yet implemnted.
+ chrome.runtime.sendMessage { handler: "runBackgroundCommand", frameId, registryEntry, count}
else
- count = 1 if registryEntry.noRepeat
if registryEntry.passCountToFunction
Utils.invokeCommandString registryEntry.command, [count]
else