aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2016-02-04 07:54:47 +0000
committerStephen Blott2016-02-04 07:54:47 +0000
commitb6a0cc82d138dd67a77d8e3298c6f56362e729be (patch)
tree979847e2617469e9e3336519ca0b691fe0935409
parent4874362d8f14d2cdf712a4c01ac756f2dd6f6e4c (diff)
downloadvimium-b6a0cc82d138dd67a77d8e3298c6f56362e729be.tar.bz2
Revert "Tweaks to #1966."
This reverts commit 4874362d8f14d2cdf712a4c01ac756f2dd6f6e4c.
-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