Try to optimize slow patches
This commit is contained in:
parent
b6a442ce73
commit
8de5c1ba3b
2 changed files with 3 additions and 3 deletions
|
|
@ -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"
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue