aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2022-10-04 00:52:42 +0200
committerVendicated <vendicated@riseup.net>2022-10-04 00:52:50 +0200
commitcc257533148419b1c94a1cd257e756d2688a403c (patch)
tree84affcf23ec84304efcb381626ac4d995db0ec95 /src/plugins
parenta9eae106c7cc6cccbb5c3f030130d3c7b6461c3e (diff)
downloadVencord-cc257533148419b1c94a1cd257e756d2688a403c.tar.gz
Vencord-cc257533148419b1c94a1cd257e756d2688a403c.tar.bz2
Vencord-cc257533148419b1c94a1cd257e756d2688a403c.zip
feat: Experimental browser support
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/settings.ts12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/plugins/settings.ts b/src/plugins/settings.ts
index 2ed85e6..6927f64 100644
--- a/src/plugins/settings.ts
+++ b/src/plugins/settings.ts
@@ -1,6 +1,7 @@
import definePlugin from "../utils/types";
import gitHash from "git-hash";
import { Devs } from '../utils/constants';
+import { IS_WEB } from "../utils/isWeb";
export default definePlugin({
name: "Settings",
@@ -15,9 +16,12 @@ export default definePlugin({
replace: m => {
const idx = m.indexOf("Host") - 1;
const template = m.slice(0, idx);
- return `${m}, ${template}"Vencord ", "${gitHash}"), " "), ` +
- `${template} "Electron ",VencordNative.getVersions().electron)," "), ` +
- `${template} "Chrome ",VencordNative.getVersions().chrome)," ")`;
+ let r = `${m}, ${template}"Vencord ", "${gitHash}${IS_WEB ? " (Web)" : ""}"), " ")`;
+ if (!IS_WEB) {
+ r += `,${template} "Electron ",VencordNative.getVersions().electron)," "),`;
+ r += `${template} "Chrome ",VencordNative.getVersions().chrome)," ")`;
+ }
+ return r;
}
}
]
@@ -28,7 +32,7 @@ export default definePlugin({
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},` +
+ `{section:"VencordUpdater",label:"Updater",element:Vencord.Components.Updater,predicate:()=>!IS_WEB},` +
`{section:${mod}.ID.DIVIDER},${m}`
}