aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts/vimium_frontend.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'content_scripts/vimium_frontend.coffee')
-rw-r--r--content_scripts/vimium_frontend.coffee18
1 files changed, 9 insertions, 9 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee
index ef11d450..bcbc3574 100644
--- a/content_scripts/vimium_frontend.coffee
+++ b/content_scripts/vimium_frontend.coffee
@@ -774,7 +774,7 @@ window.HelpDialog =
showing: false
# This setting is pulled out of local storage. It's false by default.
- getShowAdvancedCommands: -> Settings.get "helpDialog_showAdvancedCommands"
+ getShowAdvancedCommands: -> Settings.get("helpDialog_showAdvancedCommands")
init: ->
return if @container?
@@ -792,7 +792,7 @@ window.HelpDialog =
false)
@dialogElement.getElementsByClassName("optionsPage")[0].addEventListener("click", (clickEvent) ->
clickEvent.preventDefault()
- chrome.runtime.sendMessage {handler: "openOptionsPageInNewTab"}
+ chrome.runtime.sendMessage({handler: "openOptionsPageInNewTab"})
false)
@dialogElement.getElementsByClassName("toggleAdvancedCommands")[0].addEventListener("click",
HelpDialog.toggleAdvancedCommands, false)
@@ -800,19 +800,19 @@ window.HelpDialog =
isReady: -> document.body? and @container?
show: (html) ->
- return if @showing or !@isReady()
- @showing = true
+ return if HelpDialog.showing or !@isReady()
+ HelpDialog.showing = true
for placeholder, htmlString of html
@dialogElement.querySelector("#help-dialog-#{placeholder}").innerHTML = htmlString
document.body.appendChild @container
- @showAdvancedCommands @getShowAdvancedCommands()
+ @showAdvancedCommands(@getShowAdvancedCommands())
# Simulating a click on the help dialog makes it the active element for scrolling.
DomUtils.simulateClick document.getElementById "vimiumHelpDialog"
hide: ->
- @showing = false
+ HelpDialog.showing = false
@container?.parentNode?.removeChild @container
toggle: (html) ->
@@ -824,16 +824,16 @@ window.HelpDialog =
toggleAdvancedCommands: (event) ->
event.preventDefault()
showAdvanced = HelpDialog.getShowAdvancedCommands()
- HelpDialog.showAdvancedCommands !showAdvanced
+ HelpDialog.showAdvancedCommands(!showAdvanced)
Settings.set("helpDialog_showAdvancedCommands", !showAdvanced)
showAdvancedCommands: (visible) ->
- @dialogElement.getElementsByClassName("toggleAdvancedCommands")[0].innerHTML =
+ HelpDialog.dialogElement.getElementsByClassName("toggleAdvancedCommands")[0].innerHTML =
if visible then "Hide advanced commands" else "Show advanced commands"
# Add/remove the showAdvanced class to show/hide advanced commands.
addOrRemove = if visible then "add" else "remove"
- @dialogElement.classList[addOrRemove] "showAdvanced"
+ HelpDialog.dialogElement.classList[addOrRemove] "showAdvanced"
initializePreDomReady()
DomUtils.documentReady initializeOnDomReady