diff --git a/backend/src/constants/funbox-list.ts b/backend/src/constants/funbox-list.ts index e02c2a2f787a..07b003b5a16a 100644 --- a/backend/src/constants/funbox-list.ts +++ b/backend/src/constants/funbox-list.ts @@ -354,6 +354,13 @@ const FunboxList: MonkeyTypes.FunboxMetadata[] = [ frontendFunctions: ["alterText"], name: "ddoouubblleedd", }, + { + canGetPb: false, + difficultyLevel: 1, + properties: ["changesCapitalisation"], + frontendFunctions: ["alterText"], + name: "instant_messaging", + }, ]; export default FunboxList; diff --git a/frontend/src/ts/test/funbox/funbox-list.ts b/frontend/src/ts/test/funbox/funbox-list.ts index a1d0ea63c545..ede52df88b1d 100644 --- a/frontend/src/ts/test/funbox/funbox-list.ts +++ b/frontend/src/ts/test/funbox/funbox-list.ts @@ -273,6 +273,11 @@ const list: MonkeyTypes.FunboxMetadata[] = [ info: "TTyyppee eevveerryytthhiinngg ttwwiiccee..", properties: ["noLigatures"], }, + { + name: "instant_messaging", + info: "Who needs shift anyway?", + properties: ["changesCapitalisation"], + }, ]; export function getAll(): MonkeyTypes.FunboxMetadata[] { diff --git a/frontend/src/ts/test/funbox/funbox.ts b/frontend/src/ts/test/funbox/funbox.ts index 2dd631a97ac7..795930673779 100644 --- a/frontend/src/ts/test/funbox/funbox.ts +++ b/frontend/src/ts/test/funbox/funbox.ts @@ -523,6 +523,16 @@ FunboxList.setFunboxFunctions("ddoouubblleedd", { }, }); +FunboxList.setFunboxFunctions("instant_messaging", { + alterText(word: string): string { + return word + .toLowerCase() + .replace(/[.!?]$/g, "\n") //replace .?! with enter + .replace(/[().'"]/g, "") //remove special characters + .replace(/\n+/g, "\n"); //make sure there is only one enter + }, +}); + export function toggleScript(...params: string[]): void { FunboxList.get(Config.funbox).forEach((funbox) => { if (funbox.functions?.toggleScript) funbox.functions.toggleScript(params); diff --git a/frontend/static/funbox/_list.json b/frontend/static/funbox/_list.json index e20f1e6c2eba..bbebd6527858 100644 --- a/frontend/static/funbox/_list.json +++ b/frontend/static/funbox/_list.json @@ -195,5 +195,10 @@ "name": "ddoouubblleedd", "info": "TTyyppee eevveerryytthhiinngg ttwwiiccee..", "canGetPb": true + }, + { + "name": "instant_messaging", + "info": "Who needs shift anyway?", + "canGetPb": false } ]