Skip to content

Commit 5d83198

Browse files
committed
chore: remove unnecessary code
1 parent 2ec5e0a commit 5d83198

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

frontend/src/ts/test/test-ui.ts

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,41 +1164,6 @@ async function loadWordsHistory(): Promise<boolean> {
11641164
TestInput.burstHistory[i]
11651165
}" input="${input.replace(/"/g, "&quot;").replace(/ /g, "_")}">`;
11661166
}
1167-
if (i === TestInput.input.history.length - 1) {
1168-
//last word
1169-
const wordstats = {
1170-
correct: 0,
1171-
incorrect: 0,
1172-
missed: 0,
1173-
};
1174-
const length = Config.mode === "zen" ? input.length : word.length;
1175-
for (let c = 0; c < length; c++) {
1176-
if (c < input.length) {
1177-
//on char that still has a word list pair
1178-
if (Config.mode === "zen" || input[c] === word[c]) {
1179-
wordstats.correct++;
1180-
} else {
1181-
wordstats.incorrect++;
1182-
}
1183-
} else {
1184-
//on char that is extra
1185-
wordstats.missed++;
1186-
}
1187-
}
1188-
if (wordstats.incorrect !== 0 || Config.mode !== "time") {
1189-
if (Config.mode !== "zen" && input !== word) {
1190-
wordEl = `<div class='word nocursor error' burst="${
1191-
TestInput.burstHistory[i]
1192-
}" input="${input.replace(/"/g, "&quot;").replace(/ /g, "_")}">`;
1193-
}
1194-
}
1195-
} else {
1196-
if (Config.mode !== "zen" && input !== word) {
1197-
wordEl = `<div class='word nocursor error' burst="${
1198-
TestInput.burstHistory[i]
1199-
}" input="${input.replace(/"/g, "&quot;").replace(/ /g, "_")}">`;
1200-
}
1201-
}
12021167

12031168
let loop;
12041169
if (Config.mode === "zen" || input.length > word.length) {

0 commit comments

Comments
 (0)