mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-03 04:19:06 +08:00
added the ability to see how many seconds were afk after the test
This commit is contained in:
parent
d8dab10085
commit
fccb59a51d
2 changed files with 5 additions and 1 deletions
|
@ -717,7 +717,7 @@
|
|||
</div>
|
||||
<div class="group time">
|
||||
<div class="top">time</div>
|
||||
<div class="bottom">-</div>
|
||||
<div class="bottom" aria-label="" data-balloon-pos="up">-</div>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
|
||||
|
|
|
@ -1382,7 +1382,11 @@ function showResult(difficultyFailed = false) {
|
|||
$("#result .stats .key .bottom").text(
|
||||
stats.correctChars + stats.correctSpaces + "/" + stats.incorrectChars
|
||||
);
|
||||
|
||||
let afkseconds = keypressPerSecond.filter((x) => x == 0).length;
|
||||
|
||||
$("#result .stats .time .bottom").text(testtime + "s");
|
||||
$("#result .stats .time .bottom").attr("aria-label", `${afkseconds}s afk`);
|
||||
|
||||
setTimeout(function () {
|
||||
$("#resultExtraButtons").removeClass("hidden").css("opacity", 0).animate(
|
||||
|
|
Loading…
Reference in a new issue