aboutsummaryrefslogtreecommitdiffstats
path: root/pages/help_dialog.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'pages/help_dialog.coffee')
-rw-r--r--pages/help_dialog.coffee9
1 files changed, 6 insertions, 3 deletions
diff --git a/pages/help_dialog.coffee b/pages/help_dialog.coffee
index 4ac9116b..08180a72 100644
--- a/pages/help_dialog.coffee
+++ b/pages/help_dialog.coffee
@@ -73,7 +73,7 @@ HelpDialog =
for key in command.keys.sort compareKeys
@instantiateHtmlTemplate keysElement, "#keysTemplate", (element) ->
lastElement = element
- $$(element, ".vimiumHelpDialogKey").innerHTML = Utils.escapeHtml key
+ $$(element, ".vimiumHelpDialogKey").textContent = key
# And strip off the trailing ", ", if necessary.
lastElement.removeChild $$ lastElement, ".commaSeparator" if lastElement
@@ -83,7 +83,7 @@ HelpDialog =
commandNameElement.textContent = command.command
commandNameElement.title = "Click to copy \"#{command.command}\" to clipboard."
commandNameElement.addEventListener "click", ->
- chrome.runtime.sendMessage handler: "copyToClipboard", data: commandNameElement.textContent
+ HUD.copyToClipboard commandNameElement.textContent
HUD.showForDuration("Yanked #{commandNameElement.textContent}.", 2000)
@showAdvancedCommands(@getShowAdvancedCommands())
@@ -109,7 +109,7 @@ HelpDialog =
vimiumHelpDialogContainer.scrollTop += scrollHeightDelta if 0 < scrollHeightDelta
showAdvancedCommands: (visible) ->
- document.getElementById("toggleAdvancedCommands").innerHTML =
+ document.getElementById("toggleAdvancedCommands").textContent =
if visible then "Hide advanced commands" else "Show advanced commands"
# Add/remove the showAdvanced class to show/hide advanced commands.
@@ -131,6 +131,9 @@ UIComponentServer.registerHandler (event) ->
# Abandon any HUD which might be showing within the help dialog.
HUD.abandon()
+document.addEventListener "DOMContentLoaded", ->
+ DomUtils.injectUserCss() # Manually inject custom user styles.
+
root = exports ? window
root.HelpDialog = HelpDialog
root.isVimiumHelpDialog = true