From 3f63ceb19046157692eac9e9a13486af7e50a57e Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sat, 27 Feb 2016 14:44:34 +0000 Subject: Key bindings; partially functioning w/ backgound commands. --- background_scripts/main.coffee | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'background_scripts') 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 -- cgit v1.2.3