Fix BadgesAPI not working (#3267)

Co-authored-by: Nuckyz <61953774+Nuckyz@users.noreply.github.com>
This commit is contained in:
sadan4 2025-03-04 16:15:42 -05:00 committed by GitHub
parent 721aca6e1a
commit 678da62723
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -65,12 +65,12 @@ export default definePlugin({
{ {
find: ".FULL_SIZE]:26", find: ".FULL_SIZE]:26",
replacement: { replacement: {
match: /(?<=(\i)=\(0,\i\.\i\)\(\i\);)return 0===\i.length\?/, match: /(?=;return 0===(\i)\.length\?)(?<=(\i)\.useMemo.+?)/,
replace: "$1.unshift(...$self.getBadges(arguments[0].displayProfile));$&" replace: ";$1=$2.useMemo(()=>[...$self.getBadges(arguments[0].displayProfile),...$1],[$1])"
} }
}, },
{ {
find: ".description,delay:", find: "#{intl::PROFILE_USER_BADGES}",
replacement: [ replacement: [
{ {
match: /(alt:" ","aria-hidden":!0,src:)(.{0,20}(\i)\.icon\))/, match: /(alt:" ","aria-hidden":!0,src:)(.{0,20}(\i)\.icon\))/,