added 58008 to funbox

This commit is contained in:
Corey Bergeron 2020-08-11 09:57:59 -04:00
parent a6ddadfc69
commit 6353d001a2
3 changed files with 20 additions and 0 deletions

View file

@ -42,5 +42,9 @@
{
"name": "gibberish",
"type": "script"
},
{
"name": "58008",
"type": "script"
}
]

View file

@ -269,3 +269,13 @@ function getGibberish() {
}
return ret;
}
function getNumbers() {
let randLen = Math.floor(Math.random() * 7) + 1;
let ret = "";
for (let i = 0; i < randLen; i++) {
randomNum = Math.floor(Math.random() * 9) + 1;
ret += randomNum.toString()
}
return ret;
}

View file

@ -385,6 +385,9 @@ function initWords() {
} else if (activeFunBox === "gibberish") {
setPunctuation(false);
wordsList.push(getGibberish());
} else if (activeFunBox === "58008") {
setPunctuation(false);
wordsList.push(getNumbers());
} else {
wordsList.push(randomWord);
}
@ -572,6 +575,9 @@ function addWord() {
if (activeFunBox === "gibberish") {
randomWord = getGibberish();
}
if (activeFunBox === "58008") {
randomWord = getNumbers();
}
wordsList.push(randomWord);
let w = "<div class='word'>";