Improvements for patches and misc stuff (#582)

This commit is contained in:
Nuckyz 2023-03-08 00:11:59 -03:00 committed by GitHub
parent 7322c3af04
commit 40395d562a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 324 additions and 282 deletions

View file

@ -93,8 +93,8 @@ export default definePlugin({
patches: [{
find: ",reactionRef:",
replacement: {
match: /((.)=(.{1,3})\.hideCount)(,.+?reactionCount.+?\}\))/,
replace: "$1,whoReactedProps=$3$4,$2?null:$self.renderUsers(whoReactedProps)"
match: /(?<=(\i)=(\i)\.hideCount,)(.+?reactionCount.+?\}\))/,
replace: (_, hideCount, props, rest) => `whoReactedProps=${props},${rest},${hideCount}?null:$self.renderUsers(whoReactedProps)`
}
}],