diff options
author | Vendicated <vendicated@riseup.net> | 2022-10-16 17:15:15 +0200 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2022-10-16 17:15:15 +0200 |
commit | 01ae0983b378ca478e7b6891e183718e8c45ed02 (patch) | |
tree | aac88bfa3bf4308fa067377c814fdd45a5601971 /src/plugins/settings.ts | |
parent | 845088ec024d56af4d7fdd4cd861c2aa89dbceb6 (diff) | |
download | Vencord-01ae0983b378ca478e7b6891e183718e8c45ed02.tar.gz Vencord-01ae0983b378ca478e7b6891e183718e8c45ed02.tar.bz2 Vencord-01ae0983b378ca478e7b6891e183718e8c45ed02.zip |
Optimise Web via treeshaking, cleanup build scripts
Diffstat (limited to 'src/plugins/settings.ts')
-rw-r--r-- | src/plugins/settings.ts | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/plugins/settings.ts b/src/plugins/settings.ts index afd3fd3..d26688a 100644 --- a/src/plugins/settings.ts +++ b/src/plugins/settings.ts @@ -28,12 +28,15 @@ export default definePlugin({ find: "Messages.ACTIVITY_SETTINGS", replacement: { match: /\{section:(.{1,2})\.ID\.HEADER,\s*label:(.{1,2})\..{1,2}\.Messages\.ACTIVITY_SETTINGS\}/, - replace: (m, mod) => - `{section:${mod}.ID.HEADER,label:"Vencord"},` + - '{section:"VencordSetting",label:"Vencord",element:Vencord.Components.Settings},' + - '{section:"VencordUpdater",label:"Updater",element:Vencord.Components.Updater,predicate:()=>!IS_WEB},' + - `{section:${mod}.ID.DIVIDER},${m}` - + replace: (m, mod) => { + const updater = !IS_WEB ? '{section:"VencordUpdater",label:"Updater",element:Vencord.Components.Updater},' : ""; + return ( + `{section:${mod}.ID.HEADER,label:"Vencord"},` + + '{section:"VencordSetting",label:"Vencord",element:Vencord.Components.Settings},' + + updater + + `{section:${mod}.ID.DIVIDER},${m}` + ); + } } }] }); |