Skip to content

Commit

Permalink
Fix #626: add ability to hide text hints (#627)
Browse files Browse the repository at this point in the history
  • Loading branch information
rr- authored and timss committed Oct 22, 2016
1 parent 81ce7fd commit 3decabe
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
6 changes: 5 additions & 1 deletion common/content/hints.js
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ const Hints = Module("hints", {
this._setClass(hint.imgSpan, activeHint == hintnum);
}

hint.span.setAttribute("number", hint.showText ? hintnumchars + ": " + hint.text.substr(0, 50) : hintnumchars);
hint.span.setAttribute("number", hint.showText && options.showtexthints ? hintnumchars + ": " + hint.text.substr(0, 50) : hintnumchars);
if (hint.imgSpan)
hint.imgSpan.setAttribute("number", hintnumchars);
else
Expand Down Expand Up @@ -1367,6 +1367,10 @@ const Hints = Module("hints", {
["name", "Match against the name of an input field, only if neither a name or value could be found."]
]
});

options.add(["showtexthints", "sth"],
"Whether to show text picked by :hintinputs",
"boolean", true);
}
});

Expand Down
10 changes: 10 additions & 0 deletions common/locale/en-US/options.xml
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,16 @@
</description>
</item>

<item>
<tags>'sth' 'showtexthints'</tags>
<spec>'showtexthints' 'sth'</spec>
<type>boolean</type>
<default>on</default>
<description>
<p>Whether to show text picked by <ex>:hintinputs</ex> after the hint label.</p>
</description>
</item>


<item>
<tags>'hm' 'hintmatching'</tags>
Expand Down
10 changes: 10 additions & 0 deletions common/locale/ja/options.xml
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,16 @@
</description>
</item>

<item>
<tags>'sth' 'showtexthints'</tags>
<spec>'showtexthints' 'sth'</spec>
<type>boolean</type>
<default>off</default>
<description>
<p><ex>:hintinputs</ex>のテクストを見せますかどうか。</p>
</description>
</item>


<item>
<tags>'hm' 'hintmatching'</tags>
Expand Down

0 comments on commit 3decabe

Please sign in to comment.