From b7811c596f77afb2d61dbd53e7bbbacf165285a9 Mon Sep 17 00:00:00 2001 From: mrmr1993 Date: Wed, 3 Feb 2016 02:42:17 +0000 Subject: Simple cosmetic changes to VimiumHelpDialog --- content_scripts/vimium_frontend.coffee | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'content_scripts/vimium_frontend.coffee') 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() -- cgit v1.2.3