Fix BetterNoteBox

This commit is contained in:
Nuckyz 2023-10-26 15:07:44 -03:00
parent 07c4a097e0
commit 6d605050e1
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9

View file

@ -32,10 +32,16 @@ export default definePlugin({
{
find: "hideNote:",
all: true,
// Some modules match the find but the replacement is returned untouched
noWarn: true,
predicate: () => Vencord.Settings.plugins.BetterNotesBox.hide,
replacement: {
match: /hideNote:.+?(?=[,}])/g,
replace: "hideNote:true",
match: /hideNote:.+?(?=([,}].*?\)))/g,
replace: (m, rest) => {
const destructuringMatch = rest.match(/}=.+/);
if (destructuringMatch == null) return "hideNote:!0";
return m;
}
}
},
{