diff options
| author | mrmr1993 | 2016-02-03 14:12:27 +0000 |
|---|---|---|
| committer | mrmr1993 | 2016-02-03 14:12:27 +0000 |
| commit | 674990c07422a61a702f14bfdaa8b3d2f3117f1b (patch) | |
| tree | 979847e2617469e9e3336519ca0b691fe0935409 | |
| parent | d65d33ce7f25c7a71bbb2dc15b161e081014ae42 (diff) | |
| download | vimium-674990c07422a61a702f14bfdaa8b3d2f3117f1b.tar.bz2 | |
Move toggleHelpDialog to HelpDialog.toggle
| -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 |
