From 940193c30bd0e426799e1507f74d47560d38e90a Mon Sep 17 00:00:00 2001 From: AutumnVN Date: Wed, 25 Oct 2023 19:47:08 +0700 Subject: [PATCH] noMosaic: fix (#1849) --- src/plugins/noMosaic/index.ts | 26 ++++++++++++++------------ src/plugins/noMosaic/styles.css | 2 +- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/plugins/noMosaic/index.ts b/src/plugins/noMosaic/index.ts index 60576ba9..49343503 100644 --- a/src/plugins/noMosaic/index.ts +++ b/src/plugins/noMosaic/index.ts @@ -15,23 +15,25 @@ export default definePlugin({ authors: [Devs.AutumnVN], description: "Removes Discord new image mosaic", tags: ["image", "mosaic", "media"], - patches: [{ - find: "Media Mosaic", - replacement: [ - { + patches: [ + { + find: ".oneByTwoLayoutThreeGrid", + replacement: [{ match: /mediaLayoutType:\i\.\i\.MOSAIC/, - replace: 'mediaLayoutType:"RESPONSIVE"', - }, - { - match: /\i===\i\.\i\.MOSAIC/, - replace: "true", + replace: 'mediaLayoutType:"RESPONSIVE"' }, { match: /null!==\(\i=\i\.get\(\i\)\)&&void 0!==\i\?\i:"INVALID"/, replace: '"INVALID"', - }, - ], - }], + },] + }, + { + find: "Messages.REMOVE_ATTACHMENT_TOOLTIP_TEXT", + replacement: { + match: /\i===\i\.\i\.MOSAIC/, + replace: "true" + } + }], start() { enableStyle(style); }, diff --git a/src/plugins/noMosaic/styles.css b/src/plugins/noMosaic/styles.css index 54616858..05ea2489 100644 --- a/src/plugins/noMosaic/styles.css +++ b/src/plugins/noMosaic/styles.css @@ -1,3 +1,3 @@ -[class^="nonMediaAttachmentsContainer-"] [class*="messageAttachment-"] { +[class^="nonMediaAttachmentsContainer_"] [class*="messageAttachment_"] { position: relative; }