diff options
author | Vendicated <vendicated@riseup.net> | 2022-11-11 16:43:40 +0100 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2022-11-11 16:43:40 +0100 |
commit | 2133823bd369efa145474f6e558a82a960d48d52 (patch) | |
tree | 4bf70ebe3db18c7b0b7db70547c4dcbb32385b6a /src/plugins | |
parent | 1176896a1b7aa5615b4aae28cc885683f0dadd1a (diff) | |
download | Vencord-2133823bd369efa145474f6e558a82a960d48d52.tar.gz Vencord-2133823bd369efa145474f6e558a82a960d48d52.tar.bz2 Vencord-2133823bd369efa145474f6e558a82a960d48d52.zip |
more plugin fixes
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/apiMessageAccessories.ts | 6 | ||||
-rw-r--r-- | src/plugins/pronoundb/index.ts | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/apiMessageAccessories.ts b/src/plugins/apiMessageAccessories.ts index 5f6c693..ee3ee90 100644 --- a/src/plugins/apiMessageAccessories.ts +++ b/src/plugins/apiMessageAccessories.ts @@ -27,9 +27,9 @@ export default definePlugin({ { find: "_messageAttachmentToEmbedMedia", replacement: { - match: /\(\)\.container,children:[[^\]]*]\)},(.+?)\)};return/, - replace: (_, accessories) => - `().container)},Vencord.Api.MessageAccessories._modifyAccessories([${accessories}],this.props))};return`, + match: /(\(\)\.container\)?,children:)(\[[^\]]+\])(}\)\};return)/, + replace: (_, pre, accessories, post) => + `${pre}Vencord.Api.MessageAccessories._modifyAccessories(${accessories},this.props)${post}`, }, }, ], diff --git a/src/plugins/pronoundb/index.ts b/src/plugins/pronoundb/index.ts index 121e0d6..499a73a 100644 --- a/src/plugins/pronoundb/index.ts +++ b/src/plugins/pronoundb/index.ts @@ -46,11 +46,12 @@ export default definePlugin({ { find: "currentPronouns:", all: true, + noWarn: true, replacement: { match: /\(0,.{1,3}\.jsxs?\)\((.{1,10}),(\{[^[}]*currentPronouns:[^}]*(\w)\.pronouns[^}]*\})\)/, replace: (original, PronounComponent, pronounProps, fullProps) => { // UserSettings - if (fullProps.includes("onPronounsChange")) return original; + if (pronounProps.includes("onPronounsChange")) return original; return `Vencord.Plugins.plugins.PronounDB.PronounsProfileWrapper(${PronounComponent}, ${pronounProps}, ${fullProps})`; } |