mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-22 12:57:01 -04:00
Optimize slowest patches
This commit is contained in:
parent
1866e4d379
commit
8f59cd8a1a
14 changed files with 33 additions and 33 deletions
|
@ -344,8 +344,8 @@ export default definePlugin({
|
|||
{
|
||||
// Patch the stickers array to add fake nitro stickers
|
||||
predicate: () => settings.store.transformStickers,
|
||||
match: /(?<=renderStickersAccessories\((\i)\){let (\i)=\(0,\i\.\i\)\(\i\).+?;)/,
|
||||
replace: (_, message, stickers) => `${stickers}=$self.patchFakeNitroStickers(${stickers},${message});`
|
||||
match: /renderStickersAccessories\((\i)\){let (\i)=\(0,\i\.\i\)\(\i\).+?;/,
|
||||
replace: (m, message, stickers) => `${m}${stickers}=$self.patchFakeNitroStickers(${stickers},${message});`
|
||||
},
|
||||
{
|
||||
// Filter attachments to remove fake nitro stickers or emojis
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue