mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-04 04:51:16 +08:00
fixed a bug that would generate single letters in timed mode
This commit is contained in:
parent
958596578d
commit
779d9d1255
1 changed files with 3 additions and 10 deletions
|
@ -228,8 +228,8 @@ function initWords() {
|
|||
async: false,
|
||||
success: function (data) {
|
||||
hideBackgroundLoader();
|
||||
words['english_10k'] = data;
|
||||
language = words[config.language];
|
||||
words['english_10k'] = data;
|
||||
language = words[config.language];
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -339,14 +339,7 @@ function punctuateWord(previousWord, currentWord, index, maxindex){
|
|||
}
|
||||
|
||||
function addWord() {
|
||||
let language = "english";
|
||||
if(config.language === "english_10k"){
|
||||
$.getJSON("js/english_10k", data => {
|
||||
language = data;
|
||||
})
|
||||
}else{
|
||||
language = words[config.language];
|
||||
}
|
||||
let language = words[config.language];
|
||||
let randomWord = language[Math.floor(Math.random() * language.length)];
|
||||
previousWord = wordsList[wordsList.length - 1];
|
||||
previousWordStripped = previousWord.replace(/[.?!":\-,]/g,'').toLowerCase();
|
||||
|
|
Loading…
Reference in a new issue