aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--content_scripts/vimium.css2
-rw-r--r--content_scripts/vimium_frontend.coffee11
2 files changed, 6 insertions, 7 deletions
diff --git a/content_scripts/vimium.css b/content_scripts/vimium.css
index f323cbd6..6e262f32 100644
--- a/content_scripts/vimium.css
+++ b/content_scripts/vimium.css
@@ -138,7 +138,7 @@ div#vimiumHelpDialog {
border-radius:6px;
padding:8px 12px;
width:640px;
- max-height: 85%;
+ max-height: calc(100% - 80px);
left:50%;
/* This needs to be 1/2 width to horizontally center the help dialog */
margin-left:-320px;
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()