mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-01-09 17:04:30 +08:00
not showing balloons when no data is there
This commit is contained in:
parent
d312afee01
commit
e92b68bc3a
2 changed files with 6 additions and 1 deletions
|
|
@ -279,7 +279,9 @@ function secondsToString(sec) {
|
|||
let secondsString;
|
||||
hours < 10 ? (hoursString = "0" + hours) : (hoursString = hours);
|
||||
minutes < 10 ? (minutesString = "0" + minutes) : (minutesString = minutes);
|
||||
seconds < 10 ? (secondsString = "0" + seconds) : (secondsString = seconds);
|
||||
seconds < 10 && minutes > 0
|
||||
? (secondsString = "0" + seconds)
|
||||
: (secondsString = seconds);
|
||||
|
||||
let ret = "";
|
||||
if (hours > 0) ret += hoursString + ":";
|
||||
|
|
|
|||
|
|
@ -1317,6 +1317,9 @@ function showResult(difficultyFailed = false) {
|
|||
$("#result .stats .raw .bottom").text(roundTo2(stats.wpmRaw));
|
||||
$("#result .stats .acc .bottom").text(roundTo2(stats.acc) + "%");
|
||||
$("#result .stats .time .bottom").text(roundTo2(testtime) + "s");
|
||||
$("#result .stats .wpm .bottom").removeAttr("aria-label");
|
||||
$("#result .stats .raw .bottom").removeAttr("aria-label");
|
||||
$("#result .stats .acc .bottom").removeAttr("aria-label");
|
||||
$("#result .stats .time .bottom").attr("aria-label", `${afkseconds}s afk`);
|
||||
} else {
|
||||
$("#result .stats .wpm .bottom").text(Math.round(stats.wpm));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue