From 6dc9978ab70505dba06ad113b808bc99cf3ed0c5 Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Mon, 6 Jan 2025 21:02:31 -0700 Subject: [PATCH] mediaTweaks: No Sticker Autosend --- src/mediaTweaks/index.ts | 9 +++++++++ src/mediaTweaks/manifest.json | 7 ++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/mediaTweaks/index.ts b/src/mediaTweaks/index.ts index fba1bf3..488c716 100644 --- a/src/mediaTweaks/index.ts +++ b/src/mediaTweaks/index.ts @@ -77,6 +77,15 @@ export const patches: Patch[] = [ match: /if\((.)\.sourceWidth<.\.targetWidth\){/, replacement: (orig, props) => `require("mediaTweaks_imagePropsProcessor").default(${props});${orig}` } + }, + + // No Sticker Autosend + { + find: ',"chat input type must be set");', + replace: { + match: /(?<=!.&&\()(\(0,.\..{1,2}\)\(.+?\.drafts\.type\))\?/, + replacement: (_, orig) => `((moonlight.getConfigOption("mediaTweaks","noStickerAutosend")??true)?true:${orig})?` + } } ]; diff --git a/src/mediaTweaks/manifest.json b/src/mediaTweaks/manifest.json index 7869945..9e70d44 100644 --- a/src/mediaTweaks/manifest.json +++ b/src/mediaTweaks/manifest.json @@ -1,7 +1,7 @@ { "$schema": "https://moonlight-mod.github.io/manifest.schema.json", "id": "mediaTweaks", - "version": "1.0.6", + "version": "1.0.7", "meta": { "name": "Media Tweaks", "tagline": "Various tweaks to images and videos. Every feature togglable.", @@ -58,6 +58,11 @@ "description": "Removes size parameters from thumbnails. **This will cause your client to freeze in channels with lots of high resolution images in them**", "type": "boolean", "default": false + }, + "noStickerAutosend": { + "displayName": "No Sticker Autosend", + "type": "boolean", + "default": true } }, "apiLevel": 2