From 201451d94edefa8c873d417f5f6190d993204b5e Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Tue, 1 Mar 2016 13:13:08 +0000 Subject: Key bindings; move Vomnibar commands back to content scripts. --- content_scripts/vimium_frontend.coffee | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'content_scripts') diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 01b02985..72be5510 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -116,7 +116,11 @@ class NormalMode extends KeyHandlerMode You have asked Vimium to perform #{count} repetitions of the command: #{registryEntry.description}.\n Are you sure you want to continue?""" - if registryEntry.isBackgroundCommand + # The Vomnibar needs special handling because it is always activated in the tab's main frame. + if registryEntry.command.startsWith "Vomnibar." + chrome.runtime.sendMessage + handler: "sendMessageToFrames", message: {name: "openVomnibar", sourceFrameId: frameId, registryEntry} + else if registryEntry.isBackgroundCommand chrome.runtime.sendMessage {handler: "runBackgroundCommand", frameId, registryEntry, count} else if registryEntry.passCountToFunction Utils.invokeCommandString registryEntry.command, [count] -- cgit v1.2.3