Remove obsolete patches for old profiles (#2800)

Co-authored-by: Nuckyz <61953774+Nuckyz@users.noreply.github.com>
This commit is contained in:
v 2024-08-22 17:13:57 +02:00 committed by GitHub
parent 2bdc2f4e82
commit 44c8463496
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 23 additions and 291 deletions

View file

@ -51,28 +51,8 @@ export default definePlugin({
}
]
},
// Patch the profile popout username header to use our pronoun hook instead of Discord's pronouns
{
find: ".pronouns,children",
replacement: [
{
match: /{user:(\i),[^}]*,pronouns:(\i),[^}]*}=\i.*?;(?=return)/,
replace: "$&let vcPronounSource;[$2,vcPronounSource]=$self.useProfilePronouns($1.id);"
},
PRONOUN_TOOLTIP_PATCH
]
},
// Patch the profile modal username header to use our pronoun hook instead of Discord's pronouns
{
find: ".nameTagSmall)",
replacement: [
{
match: /\.getName\(\i\);(?<=displayProfile.{0,200})/,
replace: "$&const [vcPronounce,vcPronounSource]=$self.useProfilePronouns(arguments[0].user.id,true);if(arguments[0].displayProfile&&vcPronounce)arguments[0].displayProfile.pronouns=vcPronounce;"
},
PRONOUN_TOOLTIP_PATCH
]
}
// @TODO Patch discord pronoun hook in user profiles (useProfilePronouns)
],
settings,