safer patch

This commit is contained in:
Vendicated 2024-08-01 14:22:31 +02:00
parent 7e2ff411f7
commit 5b5faf8239
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18
2 changed files with 2 additions and 2 deletions

View file

@ -172,7 +172,7 @@ export default definePlugin({
// This is the thread "spine" that shows in the left
find: "M11 9H4C2.89543 9 2 8.10457 2 7V1C2 0.447715 1.55228 0 1 0C0.447715 0 0 0.447715 0 1V7C0 9.20914 1.79086 11 4 11H11C11.5523 11 12 10.5523 12 10C12 9.44771 11.5523 9 11 9Z",
replacement: {
match: /mentionsCount:\i.+?null(?<=channel:(\i).+?)/,
match: /mentionsCount:\i.{0,50}?null(?<=channel:(\i).+?)/,
replace: "$&,$self.TypingIndicator($1.id)"
}
}

View file

@ -52,7 +52,7 @@ export default definePlugin({
find: "M11 9H4C2.89543 9 2 8.10457 2 7V1C2 0.447715 1.55228 0 1 0C0.447715 0 0 0.447715 0 1V7C0 9.20914 1.79086 11 4 11H11C11.5523 11 12 10.5523 12 10C12 9.44771 11.5523 9 11 9Z",
replacement:
{
match: /mentionsCount:\i.+?null(?<=channel:(\i).+?)/,
match: /mentionsCount:\i.{0,50}?null(?<=channel:(\i).+?)/,
replace: "$&,$self.CountBadge({channel: $1})"
}