mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-21 07:46:15 +08:00
biwpy kdpbyslqptyv (gibberish ?????)
This commit is contained in:
parent
51c8ad6932
commit
989da6c936
|
@ -38,5 +38,9 @@
|
|||
{
|
||||
"name": "space_balls",
|
||||
"type": "style"
|
||||
},
|
||||
{
|
||||
"name": "gibberish",
|
||||
"type": "script"
|
||||
}
|
||||
]
|
|
@ -260,3 +260,12 @@ function findLineByLeastSquares(values_y) {
|
|||
function calculateSlope([[x1, y1], [x2, y2]]) {
|
||||
return (y1 - y2) / (x1 - x2);
|
||||
}
|
||||
|
||||
function getGibberish() {
|
||||
let randLen = Math.floor(Math.random() * 7) + 1;
|
||||
let ret = "";
|
||||
for (let i = 0; i < randLen; i++) {
|
||||
ret += String.fromCharCode(97 + Math.floor(Math.random() * 26));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -382,6 +382,9 @@ function initWords() {
|
|||
}
|
||||
}
|
||||
wordsList.push(randomcaseword);
|
||||
} else if (activeFunBox === "gibberish") {
|
||||
setPunctuation(false);
|
||||
wordsList.push(getGibberish());
|
||||
} else {
|
||||
wordsList.push(randomWord);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue