diff --git a/src/plugins/blurNsfw/index.ts b/src/plugins/blurNsfw/index.ts index cb6be54c..a80f9f26 100644 --- a/src/plugins/blurNsfw/index.ts +++ b/src/plugins/blurNsfw/index.ts @@ -45,8 +45,8 @@ export default definePlugin({ { find: ".embedWrapper,embed", replacement: [{ - match: /\.embedWrapper/g, - replace: "$&+(this.props.channel.nsfw?' vc-nsfw-img':'')" + match: /\.embedWrapper(?=.+?channel_id:(\i)\.id)/g, + replace: "$&+($1.nsfw?' vc-nsfw-img':'')" }] } ], diff --git a/src/plugins/messageLogger/index.tsx b/src/plugins/messageLogger/index.tsx index ac43a9f0..ef0aa03b 100644 --- a/src/plugins/messageLogger/index.tsx +++ b/src/plugins/messageLogger/index.tsx @@ -328,6 +328,7 @@ export default definePlugin({ // Attachment renderer // Module 96063 find: ".removeAttachmentHoverButton", + group: true, replacement: [ { match: /(className:\i,attachment:\i),/,