diff options
| author | mrmr1993 | 2016-02-03 14:10:52 +0000 |
|---|---|---|
| committer | mrmr1993 | 2016-02-03 14:10:52 +0000 |
| commit | d65d33ce7f25c7a71bbb2dc15b161e081014ae42 (patch) | |
| tree | 460dfbe2834504352692bf5e6a41584ab8854bd2 /content_scripts | |
| parent | 285d400ecbfd8f71e1c5db329bad8d86a320c499 (diff) | |
| download | vimium-d65d33ce7f25c7a71bbb2dc15b161e081014ae42.tar.bz2 | |
Move frameId check from toggleHelpDialog to its message listener
Diffstat (limited to 'content_scripts')
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index b28a1a20..67742963 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -137,7 +137,7 @@ initializePreDomReady = -> requestHandlers = showHUDforDuration: handleShowHUDforDuration - toggleHelpDialog: (request) -> toggleHelpDialog(request.dialogHtml, request.frameId) + toggleHelpDialog: (request) -> if frameId == request.frameId then toggleHelpDialog request.dialogHtml focusFrame: (request) -> if (frameId == request.frameId) then focusThisFrame request refreshCompletionKeys: refreshCompletionKeys getScrollPosition: -> scrollX: window.scrollX, scrollY: window.scrollY @@ -832,8 +832,7 @@ window.HelpDialog = addOrRemove = if visible then "add" else "remove" HelpDialog.dialogElement.classList[addOrRemove] "showAdvanced" -toggleHelpDialog = (html, fid) -> - return unless fid == frameId +toggleHelpDialog = (html) -> if HelpDialog.showing HelpDialog.hide() else |
