fix: BlurNSFW (#1880)

This commit is contained in:
redstonekasi 2023-10-25 20:16:57 +02:00 committed by GitHub
parent 3a7c27253b
commit 5e13de72c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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':'')"
}]
}
],