diff options
| author | Stephen Blott | 2016-04-17 14:12:46 +0100 | 
|---|---|---|
| committer | Stephen Blott | 2016-04-17 14:15:08 +0100 | 
| commit | 10982f57bbbbe802ecc59173ce8a60582f8b34ff (patch) | |
| tree | 88676dd3d2c6e540347fb83a2419472f73c370aa /background_scripts/main.coffee | |
| parent | 27385e81debd5fcd9000c718d73e296d6723e83a (diff) | |
| download | vimium-10982f57bbbbe802ecc59173ce8a60582f8b34ff.tar.bz2 | |
Make showHelp not a background command.
Diffstat (limited to 'background_scripts/main.coffee')
| -rw-r--r-- | background_scripts/main.coffee | 6 | 
1 files changed, 2 insertions, 4 deletions
| diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index 5c6e8e19..4aa2fc41 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -82,8 +82,7 @@ chrome.webNavigation.onHistoryStateUpdated.addListener onURLChange # history.pus  chrome.webNavigation.onReferenceFragmentUpdated.addListener onURLChange # Hash changed.  # Retrieves the help dialog HTML template from a file, and populates it with the latest keybindings. -# This is called by options.coffee. -root.helpDialogHtml = (showUnboundCommands, showCommandNames, customTitle) -> +getHelpDialogHtml = ({showUnboundCommands, showCommandNames, customTitle}) ->    commandsToKey = {}    for own key of Commands.keyToCommandRegistry      command = Commands.keyToCommandRegistry[key].command @@ -209,8 +208,6 @@ BackgroundCommands =    openCopiedUrlInCurrentTab: (request) -> TabOperations.openUrlInCurrentTab extend request, url: Clipboard.paste()    openCopiedUrlInNewTab: (request) -> @createTab extend request, url: Clipboard.paste()    togglePinTab: ({tab}) -> chrome.tabs.update tab.id, {pinned: !tab.pinned} -  showHelp: ({tab, frameId}) -> -    chrome.tabs.sendMessage tab.id, {name: "toggleHelpDialog", dialogHtml: helpDialogHtml(), frameId}    moveTabLeft: moveTab    moveTabRight: moveTab    nextFrame: ({count, frameId, tabId}) -> @@ -402,6 +399,7 @@ portHandlers =  sendRequestHandlers =    runBackgroundCommand: (request) -> BackgroundCommands[request.registryEntry.command] request +  getHelpDialogHtml: getHelpDialogHtml    # getCurrentTabUrl is used by the content scripts to get their full URL, because window.location cannot help    # with Chrome-specific URLs like "view-source:http:..".    getCurrentTabUrl: ({tab}) -> tab.url | 
