mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-09 21:51:29 +08:00
added rAnDoMcAsE funbox mode
This commit is contained in:
parent
e3a529058f
commit
8ae3717613
2 changed files with 24 additions and 1 deletions
|
|
@ -21,5 +21,9 @@
|
|||
{
|
||||
"name": "choo_choo",
|
||||
"type": "style"
|
||||
},
|
||||
{
|
||||
"name": "rAnDoMcAsE",
|
||||
"type": "script"
|
||||
}
|
||||
]
|
||||
|
|
@ -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(
|
||||
`<div><i class="fas fa-gamepad"></i>${activeFunBox}</div>`
|
||||
);
|
||||
}
|
||||
|
||||
if (config.confidenceMode === "on") {
|
||||
$(".pageTest #testModesNotice").append(
|
||||
`<div><i class="fas fa-backspace"></i>confidence</div>`
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue