aboutsummaryrefslogtreecommitdiffstats
path: root/background_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 /background_scripts
parent34b1fb0f4e2ce1696c17e703d0bc43463355d6ba (diff)
downloadvimium-3f63ceb19046157692eac9e9a13486af7e50a57e.tar.bz2
Key bindings; partially functioning w/ backgound commands.
Diffstat (limited to 'background_scripts')
-rw-r--r--background_scripts/main.coffee9
1 files changed, 9 insertions, 0 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee
index 1838eb95..41b9bf8a 100644
--- a/background_scripts/main.coffee
+++ b/background_scripts/main.coffee
@@ -519,6 +519,14 @@ checkKeyQueue = (keysToCheck, tabId, frameId) ->
newKeyQueue
+runBackgroundCommand = ({frameId, registryEntry, count}) ->
+ if registryEntry.passCountToFunction
+ BackgroundCommands[registryEntry.command] count, frameId
+ else if registryEntry.noRepeat
+ BackgroundCommands[registryEntry.command] frameId
+ else
+ repeatFunction BackgroundCommands[registryEntry.command], count, 0, frameId
+
#
# Message all tabs. Args should be the arguments hash used by the Chrome sendRequest API.
#
@@ -578,6 +586,7 @@ portHandlers =
completions: handleCompletions
sendRequestHandlers =
+ runBackgroundCommand: runBackgroundCommand
getCompletionKeys: getCompletionKeysRequest
getCurrentTabUrl: getCurrentTabUrl
openUrlInNewTab: TabOperations.openUrlInNewTab