mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-17 22:29:52 +08:00
parent
b8ca187ab3
commit
77c1e8e298
4 changed files with 27 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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[] {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -195,5 +195,10 @@
|
|||
"name": "ddoouubblleedd",
|
||||
"info": "TTyyppee eevveerryytthhiinngg ttwwiiccee..",
|
||||
"canGetPb": true
|
||||
},
|
||||
{
|
||||
"name": "instant_messaging",
|
||||
"info": "Who needs shift anyway?",
|
||||
"canGetPb": false
|
||||
}
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue