From 8b4a2afeeef31e9ce4fcb54151ac9812375fdbf1 Mon Sep 17 00:00:00 2001 From: thororen <78185467+thororen1234@users.noreply.github.com> Date: Wed, 14 Jan 2026 17:58:51 -0500 Subject: [PATCH] fix message hover buttons, BetterSessions & FavGifSearch (#3911) --- src/plugins/_api/messagePopover.ts | 6 +++--- src/plugins/betterSessions/index.tsx | 2 +- src/plugins/favGifSearch/index.tsx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/plugins/_api/messagePopover.ts b/src/plugins/_api/messagePopover.ts index af8616732..ef49d5119 100644 --- a/src/plugins/_api/messagePopover.ts +++ b/src/plugins/_api/messagePopover.ts @@ -27,9 +27,9 @@ export default definePlugin({ { find: "#{intl::MESSAGE_UTILITIES_A11Y_LABEL}", replacement: { - match: /(?<=\]\}\)),(.{0,40}togglePopout:.+?}\)),(.+?)\]}\):null,(?<=\((\i\.\i),{label:.+?:null,(\i)\?\(0,\i\.jsxs?\)\(\i\.Fragment.+?message:(\i).+?)/, - replace: (_, ReactButton, PotionButton, ButtonComponent, showReactButton, message) => "" + - `]}):null,Vencord.Api.MessagePopover._buildPopoverElements(${ButtonComponent},${message}),${showReactButton}?${ReactButton}:null,${showReactButton}&&${PotionButton},` + match: /(?<=\]\}\)),(.{0,40}togglePopout:.+?\}\))\]\}\):null,(?<=\((\i\.\i),\{label:.+?:null,(\i)\?\(0,\i\.jsxs?\)\(\i\.Fragment.+?message:(\i).+?)/, + replace: (_, ReactButton, ButtonComponent, showReactButton, message) => "" + + `]}):null,Vencord.Api.MessagePopover._buildPopoverElements(${ButtonComponent},${message}),${showReactButton}?${ReactButton}:null,` } } ] diff --git a/src/plugins/betterSessions/index.tsx b/src/plugins/betterSessions/index.tsx index 496db8842..052b58674 100644 --- a/src/plugins/betterSessions/index.tsx +++ b/src/plugins/betterSessions/index.tsx @@ -75,7 +75,7 @@ export default definePlugin({ }, // Replace the icon { - match: /\.currentSession:null\),children:\[(?<=,icon:(\i)\}.+?)/, + match: /\.legacySession\),children:\[(?<=,icon:(\i)\}.+?)/, replace: "$& $self.renderIcon({ ...arguments[0], DeviceIcon: $1 }), false &&" } ] diff --git a/src/plugins/favGifSearch/index.tsx b/src/plugins/favGifSearch/index.tsx index 6d3d7c236..0847c54b3 100644 --- a/src/plugins/favGifSearch/index.tsx +++ b/src/plugins/favGifSearch/index.tsx @@ -91,8 +91,8 @@ export default definePlugin({ replacement: [ { // https://regex101.com/r/07gpzP/1 - // ($1 renderHeaderContent=function { ... switch (x) ... case FAVORITES:return) ($2) ($3 case default:return r.jsx(($), {...props})) - match: /(renderHeaderContent\(\).{1,150}FAVORITES:return)(.{1,150});(case.{1,200}default:return\(0,\i\.jsx\)\((?\i\..{1,10}),)/, + // ($1 renderHeaderContent=function { ... switch (x) ... case FAVORITES:return) ($2) ($3 case default: ... return r.jsx(($), {...props})) + match: /(renderHeaderContent\(\).{1,150}FAVORITES:return)(.{1,150});(case.{1,200}default:.{0,50}?return\(0,\i\.jsx\)\((?\i\..{1,10}),)/, replace: "$1 this.state.resultType === 'Favorites' ? $self.renderSearchBar(this, $) : $2;$3" }, {