diff options
Diffstat (limited to 'content_scripts')
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 67742963..bcbc3574 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -137,7 +137,7 @@ initializePreDomReady = -> requestHandlers = showHUDforDuration: handleShowHUDforDuration - toggleHelpDialog: (request) -> if frameId == request.frameId then toggleHelpDialog request.dialogHtml + toggleHelpDialog: (request) -> if frameId == request.frameId then HelpDialog.toggle request.dialogHtml focusFrame: (request) -> if (frameId == request.frameId) then focusThisFrame request refreshCompletionKeys: refreshCompletionKeys getScrollPosition: -> scrollX: window.scrollX, scrollY: window.scrollY @@ -815,6 +815,9 @@ window.HelpDialog = HelpDialog.showing = false @container?.parentNode?.removeChild @container + toggle: (html) -> + if @showing then @hide() else @show html + # # Advanced commands are hidden by default so they don't overwhelm new and casual users. # @@ -832,12 +835,6 @@ window.HelpDialog = addOrRemove = if visible then "add" else "remove" HelpDialog.dialogElement.classList[addOrRemove] "showAdvanced" -toggleHelpDialog = (html) -> - if HelpDialog.showing - HelpDialog.hide() - else - HelpDialog.show html - initializePreDomReady() DomUtils.documentReady initializeOnDomReady DomUtils.documentReady registerFrame |
