Fix broken plugins

This commit is contained in:
Vendicated 2023-03-31 05:55:17 +02:00
parent c86a34a15d
commit efd9927696
No known key found for this signature in database
GPG key ID: A1DC0CFB5615D905
2 changed files with 5 additions and 5 deletions

View file

@ -22,12 +22,12 @@ import definePlugin from "@utils/types";
export default definePlugin({ export default definePlugin({
name: "MessagePopoverAPI", name: "MessagePopoverAPI",
description: "API to add buttons to message popovers.", description: "API to add buttons to message popovers.",
authors: [Devs.KingFish, Devs.Ven], authors: [Devs.KingFish, Devs.Ven, Devs.Nuckyz],
patches: [{ patches: [{
find: "Messages.MESSAGE_UTILITIES_A11Y_LABEL", find: "Messages.MESSAGE_UTILITIES_A11Y_LABEL",
replacement: { replacement: {
// foo && !bar ? createElement(blah,...makeElement(addReactionData)) // foo && !bar ? createElement(reactionStuffs)... createElement(blah,...makeElement(reply-other))
match: /\i&&!\i\?\(0,\i\.jsxs?\)\(.{0,200}renderPopout:.{0,300}?(\i)\(.{3,20}\{key:"add-reaction".+?\}/, match: /\i&&!\i\?\(0,\i\.jsxs?\)\(.{0,200}renderEmojiPicker:.{0,500}\?(\i)\(\{key:"reply-other"/,
replace: (m, makeElement) => { replace: (m, makeElement) => {
const msg = m.match(/message:(.{1,3}),/)?.[1]; const msg = m.match(/message:(.{1,3}),/)?.[1];
if (!msg) throw new Error("Could not find message variable"); if (!msg) throw new Error("Could not find message variable");

View file

@ -63,8 +63,8 @@ export default definePlugin({
{ {
find: ".Messages.USER_POPOUT_PRONOUNS", find: ".Messages.USER_POPOUT_PRONOUNS",
replacement: { replacement: {
match: /\i\.\i\.useExperiment\({}\)\.showPronouns/, match: /\.showPronouns/,
replace: "true" replace: ".showPronouns||true"
} }
} }
], ],