Fix BetterSettings & StartupTimings patch
This commit is contained in:
parent
97dd56ccda
commit
840d571ce2
2 changed files with 6 additions and 4 deletions
|
@ -119,7 +119,7 @@ export default definePlugin({
|
|||
{ // Settings cog context menu
|
||||
find: "Messages.USER_SETTINGS_ACTIONS_MENU_LABEL",
|
||||
replacement: {
|
||||
match: /\(0,\i.default\)\(\)(?=\.filter\(\i=>\{let\{section:\i\}=)/,
|
||||
match: /\(0,\i.useDefaultUserSettingsSections\)\(\)(?=\.filter\(\i=>\{let\{section:\i\}=)/,
|
||||
replace: "$self.wrapMenu($&)"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,10 +26,12 @@ export default definePlugin({
|
|||
description: "Adds Startup Timings to the Settings menu",
|
||||
authors: [Devs.Megu],
|
||||
patches: [{
|
||||
find: "UserSettingsSections.PAYMENT_FLOW_MODAL_TEST_PAGE,",
|
||||
find: "Messages.ACTIVITY_SETTINGS",
|
||||
replacement: {
|
||||
match: /{section:\i\.UserSettingsSections\.PAYMENT_FLOW_MODAL_TEST_PAGE/,
|
||||
replace: '{section:"StartupTimings",label:"Startup Timings",element:$self.StartupTimingPage},$&'
|
||||
match: /(?<=}\)([,;])(\i\.settings)\.forEach.+?(\i)\.push.+}\))/,
|
||||
replace: (_, commaOrSemi, settings, elements) => "" +
|
||||
`${commaOrSemi}${settings}?.[0]==="CHANGELOG"` +
|
||||
`&&${elements}.push({section:"StartupTimings",label:"Startup Timings",element:$self.StartupTimingPage})`
|
||||
}
|
||||
}],
|
||||
StartupTimingPage
|
||||
|
|
Loading…
Reference in a new issue