aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/pronoundb/index.ts
diff options
context:
space:
mode:
authorV <vendicated@riseup.net>2023-08-12 05:27:59 +0200
committerGitHub <noreply@github.com>2023-08-12 05:27:59 +0200
commit3e732646e5ab83f76b34ec7fdb3d9d8c68faca8d (patch)
tree7d407485fa5cfb7a4e14f5d097c1e6d259c39a7b /src/plugins/pronoundb/index.ts
parentd5b3b510502e952e7d0a6033f6c69fe1042ba3f1 (diff)
downloadVencord-3e732646e5ab83f76b34ec7fdb3d9d8c68faca8d.tar.gz
Vencord-3e732646e5ab83f76b34ec7fdb3d9d8c68faca8d.tar.bz2
Vencord-3e732646e5ab83f76b34ec7fdb3d9d8c68faca8d.zip
Fix plugins broken by latest canary update (#1637)
* Fix WebContextMenus * BetterGifAltText: futureproof find * Fix pronoundb profile patch * Fix NoScreensharePreview * Fix FakeNitro emote text patch --------- Co-authored-by: Nuckyz <61953774+Nuckyz@users.noreply.github.com>
Diffstat (limited to 'src/plugins/pronoundb/index.ts')
-rw-r--r--src/plugins/pronoundb/index.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/pronoundb/index.ts b/src/plugins/pronoundb/index.ts
index 8605869..52fefdc 100644
--- a/src/plugins/pronoundb/index.ts
+++ b/src/plugins/pronoundb/index.ts
@@ -68,7 +68,8 @@ export default definePlugin({
find: ".USER_PROFILE_ACTIVITY",
replacement: [
{
- match: /getGlobalName\(\i\);(?<=displayProfile.{0,200})/,
+ /* FIXME: old name is getGlobalName, new name is getName. Remove optional Global once stable has also migrated */
+ match: /\.get(?:Global)?Name\(\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