mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-17 14:19:40 +08:00
made sure test duration is included in the results obj
This commit is contained in:
parent
d4997755ab
commit
c623dd6a92
1 changed files with 4 additions and 2 deletions
|
|
@ -495,11 +495,12 @@ function showResult(difficultyFailed = false) {
|
|||
}
|
||||
}
|
||||
clearIntervals();
|
||||
let testtime = roundedToFixed(stats.time,1);
|
||||
$("#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.spaces + "/" + stats.incorrectChars);
|
||||
$("#result .stats .time .bottom").text(roundedToFixed(stats.time,1)+'s');
|
||||
$("#result .stats .time .bottom").text(testtime+'s');
|
||||
|
||||
setTimeout(function() {
|
||||
$("#showWordHistoryButton").removeClass('hidden').css('opacity',1);
|
||||
|
|
@ -533,7 +534,8 @@ function showResult(difficultyFailed = false) {
|
|||
timestamp: Date.now(),
|
||||
language: config.language,
|
||||
restartCount: restartCount,
|
||||
difficulty: config.difficulty
|
||||
difficulty: config.difficulty,
|
||||
testDuration: testtime
|
||||
};
|
||||
if(config.difficulty == "normal" || ((config.difficulty == "master" || config.difficulty == "expert") && !difficultyFailed)){
|
||||
restartCount = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue