feat(funbox): add mode that doubles each letter (LyricLy) (#4771)

* feat: add mode that doubles each letter to funbox

* increase difficulty

---------

Co-authored-by: Miodec <jack@monkeytype.com>
This commit is contained in:
Christina Hanson 2023-11-10 02:56:37 +13:00 committed by GitHub
parent 244a593fa5
commit 6b77f81201
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 0 deletions

View file

@ -331,6 +331,13 @@ const FunboxList: MonkeyTypes.FunboxMetadata[] = [
canGetPb: true,
difficultyLevel: 3,
},
{
canGetPb: true,
difficultyLevel: 1,
properties: ["noLigatures"],
frontendFunctions: ["alterText"],
name: "ddoouubblleedd",
},
];
export default FunboxList;

View file

@ -255,6 +255,11 @@ const list: MonkeyTypes.FunboxMetadata[] = [
"wordOrder:reverse",
],
},
{
name: "ddoouubblleedd",
info: "TTyyppee eevveerryytthhiinngg ttwwiiccee..",
properties: ["noLigatures"],
},
];
export function getAll(): MonkeyTypes.FunboxMetadata[] {

View file

@ -505,6 +505,12 @@ FunboxList.setFunboxFunctions("zipf", {
},
});
FunboxList.setFunboxFunctions("ddoouubblleedd", {
alterText(word: string): string {
return word.replace(/./gu, "$&$&");
},
});
export function toggleScript(...params: string[]): void {
FunboxList.get(Config.funbox).forEach((funbox) => {
if (funbox.functions?.toggleScript) funbox.functions.toggleScript(params);

View file

@ -180,5 +180,10 @@
"name": "backwards",
"info": "...sdrawkcab epyt ot yrt woN",
"canGetPb": true
},
{
"name": "ddoouubblleedd",
"info": "TTyyppee eevveerryytthhiinngg ttwwiiccee..",
"canGetPb": true
}
]