StartupTimings: Fix patch

This commit is contained in:
Nuckyz 2024-05-19 23:32:15 -03:00
parent 0a595120b9
commit 025508f18d
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
2 changed files with 1 additions and 2 deletions

View file

@ -56,7 +56,6 @@ export default definePlugin({
}
]
},
// Discord Canary
{
find: "Messages.ACTIVITY_SETTINGS",
replacement: {

View file

@ -28,7 +28,7 @@ export default definePlugin({
patches: [{
find: "Messages.ACTIVITY_SETTINGS",
replacement: {
match: /(?<=}\)([,;])(\i\.settings)\.forEach.+?(\i)\.push.+}\))/,
match: /(?<=}\)([,;])(\i\.settings)\.forEach.+?(\i)\.push.+}\)}\))/,
replace: (_, commaOrSemi, settings, elements) => "" +
`${commaOrSemi}${settings}?.[0]==="CHANGELOG"` +
`&&${elements}.push({section:"StartupTimings",label:"Startup Timings",element:$self.StartupTimingPage})`