From 233a2cf36a3649cfed980dcadca0bf542999e9ff Mon Sep 17 00:00:00 2001 From: Vendicated Date: Tue, 5 May 2026 14:13:02 +0200 Subject: [PATCH] Fix WhoReacted, remove NoMosaic for now --- src/plugins/noMosaic/index.ts | 46 -------------------------------- src/plugins/whoReacted/index.tsx | 16 ++--------- 2 files changed, 2 insertions(+), 60 deletions(-) delete mode 100644 src/plugins/noMosaic/index.ts diff --git a/src/plugins/noMosaic/index.ts b/src/plugins/noMosaic/index.ts deleted file mode 100644 index 6705160f3..000000000 --- a/src/plugins/noMosaic/index.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Vencord, a Discord client mod - * Copyright (c) 2023 Vendicated and contributors - * SPDX-License-Identifier: GPL-3.0-or-later - */ - -import { definePluginSettings } from "@api/Settings"; -import { Devs } from "@utils/constants"; -import definePlugin, { OptionType } from "@utils/types"; - -const settings = definePluginSettings({ - inlineVideo: { - description: "Play videos without carousel modal", - type: OptionType.BOOLEAN, - default: true, - restartNeeded: true - } -}); - -export default definePlugin({ - name: "NoMosaic", - authors: [Devs.AutumnVN], - description: "Removes Discord image mosaic", - tags: ["Media", "Appearance", "Chat"], - searchTerms: ["image", "mosaic", "media"], - - settings, - - patches: [ - { - find: '"PLAINTEXT_PREVIEW":"OTHER"', - replacement: { - match: /"IMAGE"===\i\|\|"VIDEO"===\i\|\|"CLIP"===\i/, - replace: "false" - } - }, - { - find: "renderAttachments(", - predicate: () => settings.store.inlineVideo, - replacement: { - match: /url:(\i)\.url\}\);return /, - replace: "$&$1.content_type?.startsWith('image/')&&" - } - }, - ] -}); diff --git a/src/plugins/whoReacted/index.tsx b/src/plugins/whoReacted/index.tsx index 862b5d315..6dab3c7cc 100644 --- a/src/plugins/whoReacted/index.tsx +++ b/src/plugins/whoReacted/index.tsx @@ -32,20 +32,8 @@ interface ReactionCacheEntry { interface ReactionProps { message: Message; - readOnly: boolean; - isLurking: boolean; - isPendingMember: boolean; - useChatFontScaling: boolean; emoji: CustomEmoji; - count: number; - burst_user_ids: any[]; - burst_count: number; - burst_colors: any[]; - burst_me: boolean; - me: boolean; type: number; - hideEmoji: boolean; - remainingBurstCurrency: number; } let Scroll: any = null; @@ -148,8 +136,8 @@ export default definePlugin({ { find: ",reactionRef:", replacement: { - match: /(\i)\?null:\(0,\i\.jsx\)\(\i\.\i,{className:\i\.reactionCount,.*?}\),/, - replace: "$&$1?null:$self.renderUsers(this?.props)," + match: /(\i)\?null:\(0,\i\.jsx\)\(\i\.\i,{className:\i\.reactionCount,.*?}\),(?<=(emoji:\i,message:\i,type:\i).+?)/, + replace: "$&$1?null:$self.renderUsers({$2})," } }, {