diff --git a/public/funbox/list.json b/public/funbox/list.json index b662b6e08..3e99d5758 100644 --- a/public/funbox/list.json +++ b/public/funbox/list.json @@ -21,5 +21,9 @@ { "name": "choo_choo", "type": "style" + }, + { + "name": "rAnDoMcAsE", + "type": "script" } ] \ No newline at end of file diff --git a/public/js/script.js b/public/js/script.js index 1f5b5eef5..cee69e1b2 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -242,6 +242,7 @@ function activateFunbox(funbox, mode) { } activeFunBox = funbox; } + updateTestModesNotice(); } function toggleScriptFunbox(...params) { @@ -450,7 +451,19 @@ function initWords() { if (config.punctuation && config.mode != "custom") { randomWord = punctuateWord(previousWord, randomWord, i, wordsBound); } - wordsList.push(randomWord); + 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]; + } + } + wordsList.push(randomcaseword); + } else { + wordsList.push(randomWord); + } } } else if (config.mode == "custom") { // let w = customText.split(" "); @@ -2575,6 +2588,12 @@ function updateTestModesNotice() { ); } + if (activeFunBox !== "none") { + $(".pageTest #testModesNotice").append( + `