1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 00:47:59 +01:00

Make a distinction between Hint/@number and Hint/@text. Closes issue #186.

This commit is contained in:
Kris Maglione
2010-12-16 22:49:00 -05:00
parent 011a7edd29
commit 2b254ecc6b
5 changed files with 17 additions and 17 deletions

View File

@@ -426,13 +426,14 @@ const Hints = Module("hints", {
let text = [];
if (hint.elem instanceof HTMLInputElement)
if (hint.elem.type === "radio")
text.push(UTF8(hint.elem.checked ? "⊙ " : "○ "));
text.push(UTF8(hint.elem.checked ? "⊙" : "○"));
else if (hint.elem.type === "checkbox")
text.push(UTF8(hint.elem.checked ? "☑ " : "☐ "));
text.push(UTF8(hint.elem.checked ? "☑" : "☐"));
if (hint.showText)
text.push(hint.text.substr(0, 50));
hint.span.setAttribute("number", str + (text.length ? ": " + text.join(" ") : ""));
hint.span.setAttribute("text", str + (text.length ? ": " + text.join(" ") : ""));
hint.span.setAttribute("number", str);
if (hint.imgSpan)
hint.imgSpan.setAttribute("number", str);
else