Skip to content

Commit 9a81831

Browse files
committed
mediaTweaks: fix enlarge on attachments and no sticker autosend
1 parent 8b4caa7 commit 9a81831

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/mediaTweaks/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ export const patches: Patch[] = [
5454

5555
// Add button
5656
{
57-
match: /(?<=isVisualMediaType:\i,channelId:.+?}=(\i);.+?;)(?=\i&&(\i)\.push\((\(0,\i\.jsx\)))/,
57+
match: /(?<=showDownload:\i,isVisualMediaType:\i}=(\i),.+?,)(?=\i&&(\i)\.push\((\(0,\i\.jsx\)))/,
5858
replacement: (_, props, buttons, createElement) =>
59-
`${buttons}.push(${createElement}(require("mediaTweaks_enlargeVideoButton").default,${props},"mediaTweaks_enlargeVideoButton"));`
59+
`${buttons}.push(${createElement}(require("mediaTweaks_enlargeVideoButton").default,${props},"mediaTweaks_enlargeVideoButton")),`
6060
}
6161
]
6262
},
@@ -82,7 +82,7 @@ export const patches: Patch[] = [
8282
{
8383
find: ',"chat input type must be set");',
8484
replace: {
85-
match: /(?<=\i\|\|\()(\(0,\i\.\i\)\(.+?\.drafts\.type\))\?/,
85+
match: /(?<=\i===\i\.\i\.CREATE_ANNOUNCEMENT_POST\|\|)(\(0,\i\.\i\)\(.+?\.drafts\.type\))\?/,
8686
replacement: (_, orig) => `((moonlight.getConfigOption("mediaTweaks","noStickerAutosend")??true)?true:${orig})?`
8787
}
8888
},

0 commit comments

Comments
 (0)