diff --git a/public/funbox/list.json b/public/funbox/list.json index b66a07574..bf404a5b4 100644 --- a/public/funbox/list.json +++ b/public/funbox/list.json @@ -42,5 +42,9 @@ { "name": "gibberish", "type": "script" + }, + { + "name": "58008", + "type": "script" } ] \ No newline at end of file diff --git a/public/js/misc.js b/public/js/misc.js index bec8057d4..8b5b8877f 100644 --- a/public/js/misc.js +++ b/public/js/misc.js @@ -289,3 +289,13 @@ function secondsToString(sec) { ret += secondsString; 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; +} diff --git a/public/js/script.js b/public/js/script.js index 65fa8bd1e..92566941c 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -382,6 +382,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); } @@ -569,6 +572,9 @@ function addWord() { if (activeFunBox === "gibberish") { randomWord = getGibberish(); } + if (activeFunBox === "58008") { + randomWord = getNumbers(); + } wordsList.push(randomWord); let w = "
";