aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2016-12-21 05:07:11 +0000
committerGitHub2016-12-21 05:07:11 +0000
commitcaa63d6642141d2fe4cd6941ec1e84dd2d3e8225 (patch)
treeb807d9d66e074f29d810f9ce90d9733102bf3372
parent9225b2a1b9baa96ca94c2fa23e4a293478223c7e (diff)
parent3da653a2c570e9a708e67b8a5a5db5c3ad3fa0f1 (diff)
downloadvimium-caa63d6642141d2fe4cd6941ec1e84dd2d3e8225.tar.bz2
Merge pull request #2327 from sco-tt/capitalized-link-hints-options-2
Makes sure all custom link hint characters defined in settings are lowercase
-rw-r--r--content_scripts/link_hints.coffee3
-rw-r--r--pages/options.coffee1
2 files changed, 3 insertions, 1 deletions
diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee
index 0014e20a..3a8d0786 100644
--- a/content_scripts/link_hints.coffee
+++ b/content_scripts/link_hints.coffee
@@ -444,7 +444,8 @@ class LinkHintsMode
# Use characters for hints, and do not filter links by their text.
class AlphabetHints
constructor: ->
- @linkHintCharacters = Settings.get "linkHintCharacters"
+ settingsLinkHintCharacters = Settings.get "linkHintCharacters"
+ @linkHintCharacters = settingsLinkHintCharacters.toLowerCase()
# We use the keyChar from keydown if the link-hint characters are all "a-z0-9". This is the default
# settings value, and preserves the legacy behavior (which always used keydown) for users which are
# familiar with that behavior. Otherwise, we use keyChar from keypress, which admits non-Latin
diff --git a/pages/options.coffee b/pages/options.coffee
index 7021322a..0a71611a 100644
--- a/pages/options.coffee
+++ b/pages/options.coffee
@@ -237,6 +237,7 @@ initOptionsPage = ->
HelpDialog.toggle showAllCommandDetails: true
saveOptions = ->
+ $("linkHintCharacters").value = $("linkHintCharacters").value.toLowerCase()
Option.saveOptions()
$("saveOptions").disabled = true
$("saveOptions").innerHTML = "No Changes"