Skip to content

Commit 3decabe

Browse files
rr-timss
authored andcommitted
Fix #626: add ability to hide text hints (#627)
1 parent 81ce7fd commit 3decabe

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

common/content/hints.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ const Hints = Module("hints", {
487487
this._setClass(hint.imgSpan, activeHint == hintnum);
488488
}
489489

490-
hint.span.setAttribute("number", hint.showText ? hintnumchars + ": " + hint.text.substr(0, 50) : hintnumchars);
490+
hint.span.setAttribute("number", hint.showText && options.showtexthints ? hintnumchars + ": " + hint.text.substr(0, 50) : hintnumchars);
491491
if (hint.imgSpan)
492492
hint.imgSpan.setAttribute("number", hintnumchars);
493493
else
@@ -1367,6 +1367,10 @@ const Hints = Module("hints", {
13671367
["name", "Match against the name of an input field, only if neither a name or value could be found."]
13681368
]
13691369
});
1370+
1371+
options.add(["showtexthints", "sth"],
1372+
"Whether to show text picked by :hintinputs",
1373+
"boolean", true);
13701374
}
13711375
});
13721376

common/locale/en-US/options.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,16 @@
581581
</description>
582582
</item>
583583

584+
<item>
585+
<tags>'sth' 'showtexthints'</tags>
586+
<spec>'showtexthints' 'sth'</spec>
587+
<type>boolean</type>
588+
<default>on</default>
589+
<description>
590+
<p>Whether to show text picked by <ex>:hintinputs</ex> after the hint label.</p>
591+
</description>
592+
</item>
593+
584594

585595
<item>
586596
<tags>'hm' 'hintmatching'</tags>

common/locale/ja/options.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,16 @@
570570
</description>
571571
</item>
572572

573+
<item>
574+
<tags>'sth' 'showtexthints'</tags>
575+
<spec>'showtexthints' 'sth'</spec>
576+
<type>boolean</type>
577+
<default>off</default>
578+
<description>
579+
<p><ex>:hintinputs</ex>のテクストを見せますかどうか。</p>
580+
</description>
581+
</item>
582+
573583

574584
<item>
575585
<tags>'hm' 'hintmatching'</tags>

0 commit comments

Comments
 (0)