mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-11 06:31:51 +08:00
fixed word highlight causing difficulties to not work as intended. fixes #550
This commit is contained in:
parent
6452fb274f
commit
eb62aaa70b
1 changed files with 17 additions and 0 deletions
|
|
@ -941,6 +941,23 @@ function compareInput(showError) {
|
|||
// this is when input so far is correct
|
||||
correctSoFar = true;
|
||||
}
|
||||
if (!correctSoFar) {
|
||||
if (config.difficulty == "master") {
|
||||
if (!resultVisible) {
|
||||
inputHistory.push(currentInput);
|
||||
correctedHistory.push(currentCorrected);
|
||||
document
|
||||
.querySelector("#words .word.active")
|
||||
.setAttribute("input", currentInput.replace(/'/g, "'"));
|
||||
lastSecondNotRound = true;
|
||||
showResult(true);
|
||||
}
|
||||
let testNow = Date.now();
|
||||
let testSeconds = roundTo2((testNow - testStart) / 1000);
|
||||
incompleteTestSeconds += testSeconds;
|
||||
restartCount++;
|
||||
}
|
||||
}
|
||||
let classString = correctSoFar ? "correct" : "incorrect";
|
||||
if (config.blindMode) {
|
||||
classString = "correct";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue