From 17e233a2bdbb725a14b9aa363ed659a5bd9feeb2 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Fri, 29 May 2015 10:30:25 +0100 Subject: Pass command's registry entry to content script. --- background_scripts/main.coffee | 14 +++++++------- content_scripts/vimium_frontend.coffee | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index a13d9d98..e7a1f82c 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -558,13 +558,13 @@ checkKeyQueue = (keysToCheck, tabId, frameId) -> if runCommand if not registryEntry.isBackgroundCommand - chrome.tabs.sendMessage(tabId, - name: "executePageCommand", - command: registryEntry.command, - frameId: frameId, - count: count, - passCountToFunction: registryEntry.passCountToFunction, - completionKeys: generateCompletionKeys("")) + chrome.tabs.sendMessage tabId, + name: "executePageCommand" + command: registryEntry.command + frameId: frameId + count: count + completionKeys: generateCompletionKeys "" + registryEntry: registryEntry refreshedCompletionKeys = true else if registryEntry.passCountToFunction diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 41fb772b..6b27924d 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -314,7 +314,7 @@ executePageCommand = (request) -> # All other commands are handled in their frame (but only if Vimium is enabled). return unless frameId == request.frameId and isEnabledForUrl - if (request.passCountToFunction) + if request.registryEntry.passCountToFunction Utils.invokeCommandString(request.command, [request.count]) else Utils.invokeCommandString(request.command) for i in [0...request.count] -- cgit v1.2.3