aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts
diff options
context:
space:
mode:
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