mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-02 20:08:18 +08:00
fixed randomcase not adding words
This commit is contained in:
parent
71b8728e09
commit
54685e9fb8
1 changed files with 20 additions and 9 deletions
|
@ -587,18 +587,29 @@ function addWord() {
|
|||
randomWord = language[Math.floor(Math.random() * language.length)];
|
||||
}
|
||||
}
|
||||
|
||||
if (activeFunBox === "rAnDoMcAsE") {
|
||||
let randomcaseword = "";
|
||||
for (let i = 0; i < randomWord.length; i++) {
|
||||
if (i % 2 != 0) {
|
||||
randomcaseword += randomWord[i].toUpperCase();
|
||||
} else {
|
||||
randomcaseword += randomWord[i];
|
||||
}
|
||||
}
|
||||
randomWord = randomcaseword;
|
||||
} else if (activeFunBox === "gibberish") {
|
||||
randomWord = getGibberish();
|
||||
} else if (activeFunBox === "58008") {
|
||||
randomWord = getNumbers();
|
||||
} else if (activeFunBox === "specials") {
|
||||
randomWord = getSpecials();
|
||||
}
|
||||
|
||||
if (config.punctuation && config.mode != "custom") {
|
||||
randomWord = punctuateWord(previousWord, randomWord, wordsList.length, 0);
|
||||
}
|
||||
if (activeFunBox === "gibberish") {
|
||||
randomWord = getGibberish();
|
||||
}
|
||||
if (activeFunBox === "58008") {
|
||||
randomWord = getNumbers();
|
||||
}
|
||||
if (activeFunBox === "specials") {
|
||||
randomWord = getSpecials();
|
||||
}
|
||||
|
||||
wordsList.push(randomWord);
|
||||
|
||||
let w = "<div class='word'>";
|
||||
|
|
Loading…
Reference in a new issue