diff options
| author | mrmr1993 | 2016-02-03 02:42:17 +0000 |
|---|---|---|
| committer | mrmr1993 | 2016-02-03 02:46:40 +0000 |
| commit | b7811c596f77afb2d61dbd53e7bbbacf165285a9 (patch) | |
| tree | 0fc5789a8f347a2a32b257f6888514b13a749709 /content_scripts/vimium_frontend.coffee | |
| parent | a30f8735634f9b6e34c1f1ad6d06ec520907da43 (diff) | |
| download | vimium-b7811c596f77afb2d61dbd53e7bbbacf165285a9.tar.bz2 | |
Simple cosmetic changes to VimiumHelpDialog
Diffstat (limited to 'content_scripts/vimium_frontend.coffee')
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 953798be..d85d738a 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -772,12 +772,11 @@ VimiumHelpDialog = # This setting is pulled out of local storage. It's false by default. getShowAdvancedCommands: -> Settings.get("helpDialog_showAdvancedCommands") - init: () -> - this.dialogElement = document.getElementById("vimiumHelpDialog") - this.dialogElement.getElementsByClassName("toggleAdvancedCommands")[0].addEventListener("click", + show: -> + @dialogElement = document.getElementById("vimiumHelpDialog") + @dialogElement.getElementsByClassName("toggleAdvancedCommands")[0].addEventListener("click", VimiumHelpDialog.toggleAdvancedCommands, false) - this.dialogElement.style.maxHeight = window.innerHeight - 80 - this.showAdvancedCommands(this.getShowAdvancedCommands()) + @showAdvancedCommands(@getShowAdvancedCommands()) # # Advanced commands are hidden by default so they don't overwhelm new and casual users. @@ -807,7 +806,7 @@ window.showHelpDialog = (html, fid) -> container.innerHTML = html container.getElementsByClassName("closeButton")[0].addEventListener("click", hideHelpDialog, false) - VimiumHelpDialog.init() + VimiumHelpDialog.show() container.getElementsByClassName("optionsPage")[0].addEventListener("click", (clickEvent) -> clickEvent.preventDefault() |
