From dc68e23a64a80e0aeae2f8a0aaaeb6b6af88642a Mon Sep 17 00:00:00 2001 From: Ryana May Que Date: Wed, 11 Sep 2024 22:36:06 +0800 Subject: [PATCH] BlurNsfx: improve regex matching --- src/plugins/blurNsfw/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/blurNsfw/index.ts b/src/plugins/blurNsfw/index.ts index f8dac811..1b646318 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: /(?<=channel:\s*(n)).*?\.container/g, - replace: "$&+($1.nsfw?' vc-nsfw-img':'')" + match: /\.container(?=.+?a&&(this))/g, + replace: "$&+($1.props.channel.nsfw? ' vc-nsfw-img': '')" }] }, ],