From 5e13de72c2921e4d964f6371b66ce3ff2c7a6f8c Mon Sep 17 00:00:00 2001 From: redstonekasi Date: Wed, 25 Oct 2023 20:16:57 +0200 Subject: [PATCH] fix: BlurNSFW (#1880) --- src/plugins/blurNsfw/index.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/plugins/blurNsfw/index.ts b/src/plugins/blurNsfw/index.ts index 54b1e49a4..cb6be54c9 100644 --- a/src/plugins/blurNsfw/index.ts +++ b/src/plugins/blurNsfw/index.ts @@ -45,11 +45,8 @@ export default definePlugin({ { find: ".embedWrapper,embed", replacement: [{ - match: /(\.renderEmbed=.+?(.)=.\.props)(.+?\.embedWrapper)/g, - replace: "$1,vcProps=$2$3+(vcProps.channel.nsfw?' vc-nsfw-img':'')" - }, { - match: /(\.renderAttachments=.+?(.)=this\.props)(.+?\.embedWrapper)/g, - replace: "$1,vcProps=$2$3+(vcProps.nsfw?' vc-nsfw-img':'')" + match: /\.embedWrapper/g, + replace: "$&+(this.props.channel.nsfw?' vc-nsfw-img':'')" }] } ],