From cb507babaad57d71cb34c9108c625454c6adbafd Mon Sep 17 00:00:00 2001 From: Nico Date: Tue, 28 Feb 2023 00:41:14 +0100 Subject: [PATCH] fix: vcDoubleClick and revealAllSpoilers patch (#517) Co-authored-by: Ven --- src/plugins/revealAllSpoilers.ts | 6 +++--- src/plugins/vcDoubleClick.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/revealAllSpoilers.ts b/src/plugins/revealAllSpoilers.ts index b508b6a0a..ead169fce 100644 --- a/src/plugins/revealAllSpoilers.ts +++ b/src/plugins/revealAllSpoilers.ts @@ -30,10 +30,10 @@ export default definePlugin({ patches: [ { - find: ".revealSpoiler=function", + find: ".removeObscurity=function", replacement: { - match: /\.revealSpoiler=function\((.{1,2})\){/, - replace: ".revealSpoiler=function($1){$self.reveal($1);" + match: /\.removeObscurity=function\((\i)\){/, + replace: ".removeObscurity=function($1){$self.reveal($1);" } } ], diff --git a/src/plugins/vcDoubleClick.ts b/src/plugins/vcDoubleClick.ts index 64c676cfc..695e8c51f 100644 --- a/src/plugins/vcDoubleClick.ts +++ b/src/plugins/vcDoubleClick.ts @@ -48,7 +48,7 @@ export default definePlugin({ }, { // channel mentions - find: ".EMOJI_IN_MESSAGE_HOVER", + find: ".shouldCloseDefaultModals", replacement: { match: /onClick:(\i)(?=,.{0,30}className:"channelMention")/, replace: "onClick:(_vcEv)=>(_vcEv.detail>=2||_vcEv.target.className.includes('MentionText'))&&($1)()",