aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/settings.ts
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2022-10-16 17:15:15 +0200
committerVendicated <vendicated@riseup.net>2022-10-16 17:15:15 +0200
commit01ae0983b378ca478e7b6891e183718e8c45ed02 (patch)
treeaac88bfa3bf4308fa067377c814fdd45a5601971 /src/plugins/settings.ts
parent845088ec024d56af4d7fdd4cd861c2aa89dbceb6 (diff)
downloadVencord-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.ts15
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}`
+ );
+ }
}
}]
});