mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-09 13:44:29 +08:00
showing mistake count when hovering over the accuracy number
This commit is contained in:
parent
ac0ba93a8c
commit
d0ee9502e1
1 changed files with 14 additions and 2 deletions
|
|
@ -255,7 +255,14 @@ function updateWpmAndAcc(): void {
|
|||
}
|
||||
$("#result .stats .time .bottom .text").text(time);
|
||||
$("#result .stats .raw .bottom").removeAttr("aria-label");
|
||||
$("#result .stats .acc .bottom").removeAttr("aria-label");
|
||||
// $("#result .stats .acc .bottom").removeAttr("aria-label");
|
||||
|
||||
$("#result .stats .acc .bottom").attr(
|
||||
"aria-label",
|
||||
`${TestInput.accuracy.incorrect} mistake${
|
||||
TestInput.accuracy.incorrect == 1 ? "" : "s"
|
||||
}`
|
||||
);
|
||||
} else {
|
||||
//not showing decimal places
|
||||
if (Config.alwaysShowCPM == false) {
|
||||
|
|
@ -287,7 +294,12 @@ function updateWpmAndAcc(): void {
|
|||
}
|
||||
|
||||
$("#result .stats .acc .bottom").text(Math.floor(result.acc) + "%");
|
||||
$("#result .stats .acc .bottom").attr("aria-label", result.acc + "%");
|
||||
$("#result .stats .acc .bottom").attr(
|
||||
"aria-label",
|
||||
`${result.acc}% (${TestInput.accuracy.incorrect} mistake${
|
||||
TestInput.accuracy.incorrect == 1 ? "" : "s"
|
||||
})`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue