Try to optimize slow patches

This commit is contained in:
thororen1234 2026-04-24 13:06:17 -04:00
parent b6a442ce73
commit 8de5c1ba3b
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View file

@ -24,7 +24,7 @@ export default definePlugin({
find: '"],{numberOfBlockedUsers:',
replacement: [
{
match: /(?<=listType:\i,numberOfUsers:\i\}=(\i).*?\]\}\))/,
match: /(?<=listType:\i,numberOfUsers:\i\}=(\i).{0,800}numberOfIgnoredUsers:\i\}\)\}\)\]\}\))/,
replace: ",$1.listType==='blocked'?$self.renderSearchInput():null"
},
{

View file

@ -338,12 +338,12 @@ export default definePlugin({
replace: "return [$1, vc_SidebarChat]}"
},
{
match: /(?<=guild_products".+?)(case \i\.\i.+?return)(.+?\}\));(?=.+?params\.messageId)/g,
match: /(?<=guild_products.{0,1600})(case \i\.\i.{0,50}return)(.+?\}\));(?=.+?params\.messageId)/g,
replace: "$1[$2, vc_SidebarChat];",
predicate: () => settings.store.patchCommunity
},
{
match: /(case \i\.\i\.GAME_SERVERS:.*?\.CHANNEL.*?return)(.*?);/,
match: /(case \i\.\i\.GAME_SERVERS:.{0,50}\.CHANNEL.{0,25}return)(.*?);/,
replace: "$1[$2, vc_SidebarChat];",
predicate: () => settings.store.patchCommunity
}