mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-05 21:33:40 +08:00
fixed live wpm not considering correct but not submitted words
fixed raw not considering not submitted words - raw graph should be smoother
This commit is contained in:
parent
ee616b5151
commit
6a8ee9018e
1 changed files with 4 additions and 0 deletions
|
@ -2773,6 +2773,10 @@ function liveWpmAndRaw() {
|
|||
}
|
||||
chars += inputHistory[i].length;
|
||||
}
|
||||
if (wordsList[currentWordIndex] === currentInput) {
|
||||
correctWordChars += currentInput.length;
|
||||
}
|
||||
chars += currentInput.length;
|
||||
let testNow = Date.now();
|
||||
let testSeconds = (testNow - testStart) / 1000;
|
||||
let wpm = Math.round(((correctWordChars + spaces) * (60 / testSeconds)) / 5);
|
||||
|
|
Loading…
Reference in a new issue