mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-30 10:47:22 +08:00
parent
744ec677e4
commit
0e967bdc20
2 changed files with 4 additions and 6 deletions
|
|
@ -942,7 +942,7 @@ export async function init() {
|
|||
if (Config.mode == "custom") {
|
||||
wordList = CustomText.text;
|
||||
}
|
||||
const wordset = Wordset.withWords(wordList);
|
||||
const wordset = Wordset.withWords(wordList, Config.funbox);
|
||||
|
||||
if (
|
||||
(Config.funbox == "wikipedia" || Config.funbox == "poetry") &&
|
||||
|
|
@ -1240,7 +1240,7 @@ export async function addWord() {
|
|||
.leftToRight,
|
||||
words: CustomText.text,
|
||||
};
|
||||
const wordset = Wordset.withWords(language.words);
|
||||
const wordset = Wordset.withWords(language.words, Config.funbox);
|
||||
|
||||
let randomWord = await getNextWord(wordset, language, bound);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import Config from "../config";
|
||||
|
||||
let currentWordset = null;
|
||||
let currentWordGenerator = null;
|
||||
|
||||
|
|
@ -88,8 +86,8 @@ class WordGenerator extends Wordset {
|
|||
}
|
||||
}
|
||||
|
||||
export function withWords(words) {
|
||||
if (Config.funbox == "pseudolang") {
|
||||
export function withWords(words, funbox) {
|
||||
if (funbox == "pseudolang") {
|
||||
if (currentWordGenerator == null || words !== currentWordGenerator.words) {
|
||||
currentWordGenerator = new WordGenerator(words);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue