diff options
| author | Stephen Blott | 2016-02-01 12:16:32 +0000 |
|---|---|---|
| committer | Stephen Blott | 2016-02-18 10:52:45 +0000 |
| commit | ad71e692fd0254b430c38b47b6c5a9ab3e08290b (patch) | |
| tree | 50fe887f7d283eb22fda3e3c841171fb64b06727 | |
| parent | be5205e6153e39d7c08f229c2b9183fab153f823 (diff) | |
| download | vimium-ad71e692fd0254b430c38b47b6c5a9ab3e08290b.tar.bz2 | |
Wait-for-enter: add necessary option support.
| -rw-r--r-- | lib/settings.coffee | 2 | ||||
| -rw-r--r-- | pages/options.coffee | 15 | ||||
| -rw-r--r-- | pages/options.html | 19 |
3 files changed, 27 insertions, 9 deletions
diff --git a/lib/settings.coffee b/lib/settings.coffee index a33a88e8..68333cae 100644 --- a/lib/settings.coffee +++ b/lib/settings.coffee @@ -170,7 +170,7 @@ Settings = newTabUrl: "chrome://newtab" grabBackFocus: false regexFindMode: false - waitForEnterForFilteredHints: true # Once properly implmented, this will default to false. + waitForEnterForFilteredHints: false settingsVersion: Utils.getCurrentVersion() helpDialog_showAdvancedCommands: false diff --git a/pages/options.coffee b/pages/options.coffee index f0de5342..51400740 100644 --- a/pages/options.coffee +++ b/pages/options.coffee @@ -184,6 +184,7 @@ class ExclusionRulesOnPopupOption extends ExclusionRulesOption Options = exclusionRules: ExclusionRulesOption filterLinkHints: CheckBoxOption + waitForEnterForFilteredHints: CheckBoxOption hideHud: CheckBoxOption keyMappings: TextOption linkHintCharacters: NonEmptyTextOption @@ -206,14 +207,16 @@ initOptionsPage = -> # Display either "linkHintNumbers" or "linkHintCharacters", depending upon "filterLinkHints". maintainLinkHintsView = -> - hide = (el) -> el.parentNode.parentNode.style.display = "none" - show = (el) -> el.parentNode.parentNode.style.display = "table-row" + hide = (el) -> el.style.display = "none" + show = (el) -> el.style.display = "table-row" if $("filterLinkHints").checked - hide $("linkHintCharacters") - show $("linkHintNumbers") + hide $("linkHintCharactersContainer") + show $("linkHintNumbersContainer") + show $("waitForEnterForFilteredHintsContainer") else - show $("linkHintCharacters") - hide $("linkHintNumbers") + show $("linkHintCharactersContainer") + hide $("linkHintNumbersContainer") + hide $("waitForEnterForFilteredHintsContainer") maintainAdvancedOptions = -> if bgSettings.get "optionsPage_showAdvancedOptions" diff --git a/pages/options.html b/pages/options.html index b5aa5936..2a425efe 100644 --- a/pages/options.html +++ b/pages/options.html @@ -82,7 +82,7 @@ b: http://b.com/?q=%s description <input id="scrollStepSize" type="number" />px </td> </tr> - <tr> + <tr id="linkHintCharactersContainer"> <td class="caption">Characters used<br/> for link hints</td> <td verticalAlign="top"> <div class="help"> @@ -94,7 +94,7 @@ b: http://b.com/?q=%s description <div class="nonEmptyTextOption"> </td> </tr> - <tr> + <tr id="linkHintNumbersContainer"> <td class="caption">Numbers used<br/> for link hints</td> <td verticalAlign="top"> <div class="help"> @@ -129,6 +129,21 @@ b: http://b.com/?q=%s description </label> </td> </tr> + <tr id="waitForEnterForFilteredHintsContainer"> + <td class="caption"></td> + <td verticalAlign="top" class="booleanOption"> + <div class="help"> + <div class="example"> + You activate the link with <tt>Enter</tt>, <em>always</em>; so you never accidentally type Vimium + commands. + </div> + </div> + <label> + <input id="waitForEnterForFilteredHints" type="checkbox"/> + Require <tt>Enter</tt> for filtered hints + </label> + </td> + </tr> <tr> <td class="caption"></td> <td verticalAlign="top" class="booleanOption"> |
