From 8de5c1ba3bbcd6214c1bf0ad9e75d8d28a214cdd Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Fri, 24 Apr 2026 13:06:17 -0400 Subject: [PATCH] Try to optimize slow patches --- src/equicordplugins/betterBlockedUsers/index.tsx | 2 +- src/equicordplugins/sidebarChat/index.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/equicordplugins/betterBlockedUsers/index.tsx b/src/equicordplugins/betterBlockedUsers/index.tsx index 56f05b627..e1f22a079 100644 --- a/src/equicordplugins/betterBlockedUsers/index.tsx +++ b/src/equicordplugins/betterBlockedUsers/index.tsx @@ -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" }, { diff --git a/src/equicordplugins/sidebarChat/index.tsx b/src/equicordplugins/sidebarChat/index.tsx index 27a03009f..cf1f5ae7e 100644 --- a/src/equicordplugins/sidebarChat/index.tsx +++ b/src/equicordplugins/sidebarChat/index.tsx @@ -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 }