From 10982f57bbbbe802ecc59173ce8a60582f8b34ff Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sun, 17 Apr 2016 14:12:46 +0100 Subject: Make showHelp not a background command. --- content_scripts/vimium_frontend.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'content_scripts') diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 92145303..9f7d9d52 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -155,7 +155,6 @@ initializePreDomReady = -> checkIfEnabledForUrl document.hasFocus() requestHandlers = - toggleHelpDialog: (request) -> if frameId == request.frameId then HelpDialog.toggle request.dialogHtml focusFrame: (request) -> if (frameId == request.frameId) then focusThisFrame request getScrollPosition: (ignoredA, ignoredB, sendResponse) -> sendResponse scrollX: window.scrollX, scrollY: window.scrollY if frameId == 0 @@ -626,6 +625,9 @@ enterFindMode = -> Marks.setPreviousPosition() new FindMode() +window.showHelp = -> + chrome.runtime.sendMessage handler: "getHelpDialogHtml", HelpDialog.toggle.bind HelpDialog + # If we are in the help dialog iframe, HelpDialog is already defined with the necessary functions. window.HelpDialog ?= helpUI: null -- cgit v1.2.3