From 678da6272393460216dfcc47dae8c1c2b39efd16 Mon Sep 17 00:00:00 2001 From: sadan4 <117494111+sadan4@users.noreply.github.com> Date: Tue, 4 Mar 2025 16:15:42 -0500 Subject: [PATCH 1/2] Fix BadgesAPI not working (#3267) Co-authored-by: Nuckyz <61953774+Nuckyz@users.noreply.github.com> --- src/plugins/_api/badges/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/_api/badges/index.tsx b/src/plugins/_api/badges/index.tsx index 9e94c664..d22fb72d 100644 --- a/src/plugins/_api/badges/index.tsx +++ b/src/plugins/_api/badges/index.tsx @@ -65,12 +65,12 @@ export default definePlugin({ { find: ".FULL_SIZE]:26", replacement: { - match: /(?<=(\i)=\(0,\i\.\i\)\(\i\);)return 0===\i.length\?/, - replace: "$1.unshift(...$self.getBadges(arguments[0].displayProfile));$&" + match: /(?=;return 0===(\i)\.length\?)(?<=(\i)\.useMemo.+?)/, + replace: ";$1=$2.useMemo(()=>[...$self.getBadges(arguments[0].displayProfile),...$1],[$1])" } }, { - find: ".description,delay:", + find: "#{intl::PROFILE_USER_BADGES}", replacement: [ { match: /(alt:" ","aria-hidden":!0,src:)(.{0,20}(\i)\.icon\))/, From c32680100e107c38fb793e0d54221b717d91c7df Mon Sep 17 00:00:00 2001 From: sadan4 <117494111+sadan4@users.noreply.github.com> Date: Tue, 4 Mar 2025 16:17:33 -0500 Subject: [PATCH 2/2] Fix plugins using OAuth2AuthorizeModal (#3266) --- src/webpack/common/components.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webpack/common/components.ts b/src/webpack/common/components.ts index a11f056b..d5249f2f 100644 --- a/src/webpack/common/components.ts +++ b/src/webpack/common/components.ts @@ -95,7 +95,7 @@ waitFor(m => { export const MaskedLink = waitForComponent("MaskedLink", filters.componentByCode("MASKED_LINK)")); export const Timestamp = waitForComponent("Timestamp", filters.componentByCode("#{intl::MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL}")); export const Flex = waitForComponent("Flex", ["Justify", "Align", "Wrap"]); -export const OAuth2AuthorizeModal = waitForComponent("OAuth2AuthorizeModal", filters.componentByCode(".authorize),children:", ".contentBackground")); +export const OAuth2AuthorizeModal = waitForComponent("OAuth2AuthorizeModal", filters.componentByCode(".authorize,children:", ".contentBackground")); export const Animations = mapMangledModuleLazy(".assign({colorNames:", { Transition: filters.componentByCode('["items","children"]', ",null,"),