From e0d66ff0719ce9c51c685dbdd6000ffc06b06d25 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Wed, 13 Nov 2024 18:02:18 -0300 Subject: [PATCH] NoMosaic: Fix plugin not working in Canary --- src/plugins/consoleJanitor/index.ts | 7 ------- src/plugins/noMosaic/index.ts | 6 +++--- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/plugins/consoleJanitor/index.ts b/src/plugins/consoleJanitor/index.ts index 4c5499cf4..a02fcad1b 100644 --- a/src/plugins/consoleJanitor/index.ts +++ b/src/plugins/consoleJanitor/index.ts @@ -151,13 +151,6 @@ export default definePlugin({ replace: "" } }, - { - find: "[DEPRECATED] `context` will be removed in a future version. Instead use `import { createStore, useStore } from 'zustand'`. See: https://github.com/pmndrs/zustand/discussions/1180.", - replacement: { - match: /console\.warn\("\[DEPRECATED\] `context` will be removed in a future version\. Instead use `import { createStore, useStore } from 'zustand'`\. See: https:\/\/github\.com\/pmndrs\/zustand\/discussions\/1180\."\);/, - replace: "" - } - }, // Patches discords generic logger function { find: "Σ:", diff --git a/src/plugins/noMosaic/index.ts b/src/plugins/noMosaic/index.ts index 962b90fe7..6ff34a350 100644 --- a/src/plugins/noMosaic/index.ts +++ b/src/plugins/noMosaic/index.ts @@ -20,7 +20,7 @@ const settings = definePluginSettings({ export default definePlugin({ name: "NoMosaic", authors: [Devs.AutumnVN], - description: "Removes Discord new image mosaic", + description: "Removes Discord image mosaic", tags: ["image", "mosaic", "media"], settings, @@ -29,8 +29,8 @@ export default definePlugin({ { find: '=>"IMAGE"===', replacement: { - match: /=>"IMAGE"===\i\|\|"VIDEO"===\i;/, - replace: "=>false;" + match: /=>"IMAGE"===\i\|\|"VIDEO"===\i(?:\|\|("VISUAL_PLACEHOLDER"===\i))?;/, + replace: (_, visualPlaceholderPred) => visualPlaceholderPred != null ? `=>${visualPlaceholderPred};` : "=>false;" } }, {