aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMiodec <[email protected]>2024-10-21 12:38:54 +0200
committerMiodec <[email protected]>2024-10-21 12:47:09 +0200
commit5d83198ee2fcb265d6aeeacb77217e308a5da543 (patch)
tree7281f5086a5fd39ab57629497459973b749436b2
parent2ec5e0a89826d607b647c1657b2823bdb31095ef (diff)
downloadmonkeytype-5d83198ee2fcb265d6aeeacb77217e308a5da543.tar.gz
monkeytype-5d83198ee2fcb265d6aeeacb77217e308a5da543.zip
chore: remove unnecessary code
-rw-r--r--frontend/src/ts/test/test-ui.ts35
1 files changed, 0 insertions, 35 deletions
diff --git a/frontend/src/ts/test/test-ui.ts b/frontend/src/ts/test/test-ui.ts
index ce717aa68..53b8565cb 100644
--- a/frontend/src/ts/test/test-ui.ts
+++ b/frontend/src/ts/test/test-ui.ts
@@ -1164,41 +1164,6 @@ async function loadWordsHistory(): Promise<boolean> {
TestInput.burstHistory[i]
}" input="${input.replace(/"/g, "&quot;").replace(/ /g, "_")}">`;
}
- if (i === TestInput.input.history.length - 1) {
- //last word
- const wordstats = {
- correct: 0,
- incorrect: 0,
- missed: 0,
- };
- const length = Config.mode === "zen" ? input.length : word.length;
- for (let c = 0; c < length; c++) {
- if (c < input.length) {
- //on char that still has a word list pair
- if (Config.mode === "zen" || input[c] === word[c]) {
- wordstats.correct++;
- } else {
- wordstats.incorrect++;
- }
- } else {
- //on char that is extra
- wordstats.missed++;
- }
- }
- if (wordstats.incorrect !== 0 || Config.mode !== "time") {
- if (Config.mode !== "zen" && input !== word) {
- wordEl = `<div class='word nocursor error' burst="${
- TestInput.burstHistory[i]
- }" input="${input.replace(/"/g, "&quot;").replace(/ /g, "_")}">`;
- }
- }
- } else {
- if (Config.mode !== "zen" && input !== word) {
- wordEl = `<div class='word nocursor error' burst="${
- TestInput.burstHistory[i]
- }" input="${input.replace(/"/g, "&quot;").replace(/ /g, "_")}">`;
- }
- }
let loop;
if (Config.mode === "zen" || input.length > word.length) {