mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-27 01:06:21 +08:00
made sure key stat includes spaces
This commit is contained in:
parent
3c64c79ba5
commit
4b7038c78f
1 changed files with 5 additions and 4 deletions
|
|
@ -416,7 +416,6 @@ function countChars() {
|
|||
if(i < inputHistory.length-1){
|
||||
spaces++;
|
||||
}
|
||||
|
||||
}
|
||||
return {
|
||||
spaces: spaces,
|
||||
|
|
@ -445,7 +444,8 @@ function calculateStats() {
|
|||
acc: acc,
|
||||
correctChars: chars.correctWordChars,
|
||||
incorrectChars: chars.incorrectChars + chars.extraChars + chars.missedChars,
|
||||
time: testSeconds
|
||||
time: testSeconds,
|
||||
spaces: chars.spaces
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -473,14 +473,15 @@ function showResult() {
|
|||
acc: 0,
|
||||
correctChars: 0,
|
||||
incorrectChars: 0,
|
||||
time: 0
|
||||
time: 0,
|
||||
spaces: 0
|
||||
}
|
||||
}
|
||||
clearIntervals();
|
||||
$("#result .stats .wpm .bottom").text(stats.wpm);
|
||||
$("#result .stats .raw .bottom").text(stats.wpmRaw);
|
||||
$("#result .stats .acc .bottom").text(stats.acc + "%");
|
||||
$("#result .stats .key .bottom").text(stats.correctChars + "/" + stats.incorrectChars);
|
||||
$("#result .stats .key .bottom").text(stats.correctChars + stats.spaces + "/" + stats.incorrectChars);
|
||||
$("#result .stats .time .bottom").text(roundedToFixed(stats.time,1)+'s');
|
||||
|
||||
setTimeout(function() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue