From 762684a138f19308a3e64d6578aae57f453cae5f Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Thu, 28 Mar 2024 10:30:29 -0300 Subject: [PATCH] Fix more patches --- src/plugins/betterGifAltText/index.ts | 2 +- src/plugins/decor/index.tsx | 4 ++-- src/plugins/gifPaste/index.ts | 6 +++--- src/plugins/ignoreActivities/index.tsx | 2 +- src/plugins/noBlockedMessages/index.ts | 2 +- src/plugins/resurrectHome/index.tsx | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/plugins/betterGifAltText/index.ts b/src/plugins/betterGifAltText/index.ts index 8b411631..f0090343 100644 --- a/src/plugins/betterGifAltText/index.ts +++ b/src/plugins/betterGifAltText/index.ts @@ -26,7 +26,7 @@ export default definePlugin({ "Change GIF alt text from simply being 'GIF' to containing the gif tags / filename", patches: [ { - find: "onCloseImage=", + find: '"onCloseImage",', replacement: { match: /(return.{0,10}\.jsx.{0,50}isWindowFocused)/, replace: diff --git a/src/plugins/decor/index.tsx b/src/plugins/decor/index.tsx index 7b9b4e3b..d4f420c7 100644 --- a/src/plugins/decor/index.tsx +++ b/src/plugins/decor/index.tsx @@ -61,8 +61,8 @@ export default definePlugin({ }, // Remove NEW label from decor avatar decorations { - match: /(?<=\.Section\.PREMIUM_PURCHASE&&\i;if\()(?<=avatarDecoration:(\i).+?)/, - replace: "$1.skuId===$self.SKU_ID||" + match: /(?<=\.Section\.PREMIUM_PURCHASE&&\i)(?<=avatarDecoration:(\i).+?)/, + replace: "||$1.skuId===$self.SKU_ID" } ] }, diff --git a/src/plugins/gifPaste/index.ts b/src/plugins/gifPaste/index.ts index 3e864b31..5553bf84 100644 --- a/src/plugins/gifPaste/index.ts +++ b/src/plugins/gifPaste/index.ts @@ -29,10 +29,10 @@ export default definePlugin({ authors: [Devs.Ven], patches: [{ - find: ".handleSelectGIF=", + find: '"handleSelectGIF",', replacement: { - match: /\.handleSelectGIF=(\i)=>\{/, - replace: ".handleSelectGIF=$1=>{if (!this.props.className) return $self.handleSelect($1);" + match: /"handleSelectGIF",(\i)=>\{/, + replace: '"handleSelectGIF",$1=>{if (!this.props.className) return $self.handleSelect($1);' } }], diff --git a/src/plugins/ignoreActivities/index.tsx b/src/plugins/ignoreActivities/index.tsx index 5c349a4e..e2262129 100644 --- a/src/plugins/ignoreActivities/index.tsx +++ b/src/plugins/ignoreActivities/index.tsx @@ -213,7 +213,7 @@ export default definePlugin({ find: '="LocalActivityStore",', replacement: [ { - match: /HANG_STATUS.+?(?=!\i\(\i,\i\)&&)(?<=(\i)\.push.+?)/, + match: /HANG_STATUS.+?(?=!\i\(\)\(\i,\i\)&&)(?<=(\i)\.push.+?)/, replace: (m, activities) => `${m}${activities}=${activities}.filter($self.isActivityNotIgnored);` } ] diff --git a/src/plugins/noBlockedMessages/index.ts b/src/plugins/noBlockedMessages/index.ts index 8435f135..427f725c 100644 --- a/src/plugins/noBlockedMessages/index.ts +++ b/src/plugins/noBlockedMessages/index.ts @@ -39,7 +39,7 @@ export default definePlugin({ }, ...[ '="MessageStore",', - '="ReadStateStore",' + '"displayName","ReadStateStore")' ].map(find => ({ find, predicate: () => Settings.plugins.NoBlockedMessages.ignoreBlockedMessages === true, diff --git a/src/plugins/resurrectHome/index.tsx b/src/plugins/resurrectHome/index.tsx index 6b0069a7..f48debc7 100644 --- a/src/plugins/resurrectHome/index.tsx +++ b/src/plugins/resurrectHome/index.tsx @@ -59,7 +59,7 @@ export default definePlugin({ find: "GuildHomeFeedbackExperiment.definition.id", replacement: [ { - match: /return{showFeedback:\i,setOnDismissedFeedback:(\i)}/, + match: /return{showFeedback:.+?,setOnDismissedFeedback:(\i)}/, replace: "return{showFeedback:false,setOnDismissedFeedback:$1}" } ]