aboutsummaryrefslogtreecommitdiff
path: root/src/Vencord.ts
diff options
context:
space:
mode:
authorV <vendicated@riseup.net>2023-04-04 01:16:29 +0200
committerGitHub <noreply@github.com>2023-04-04 01:16:29 +0200
commit6b26c12bfa1f28d40834478b50d2f7b09c9f54fb (patch)
tree48687349f9bf6803ee8993b3eafa3ea1e4f3dff2 /src/Vencord.ts
parent5bb08bdb6465eebc9dcf80ba2971d894b804abb8 (diff)
downloadVencord-6b26c12bfa1f28d40834478b50d2f7b09c9f54fb.tar.gz
Vencord-6b26c12bfa1f28d40834478b50d2f7b09c9f54fb.tar.bz2
Vencord-6b26c12bfa1f28d40834478b50d2f7b09c9f54fb.zip
Add additional build flavours for Vencord Desktop (#765)
Diffstat (limited to 'src/Vencord.ts')
-rw-r--r--src/Vencord.ts12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/Vencord.ts b/src/Vencord.ts
index 00f8a58..73b53e8 100644
--- a/src/Vencord.ts
+++ b/src/Vencord.ts
@@ -30,7 +30,7 @@ import "./webpack/patchWebpack";
import { showNotification } from "./api/Notifications";
import { PlainSettings, Settings } from "./api/settings";
import { patches, PMLogger, startAllPlugins } from "./plugins";
-import { checkForUpdates, rebuild, update, UpdateLogger } from "./utils/updater";
+import { checkForUpdates, rebuild, update,UpdateLogger } from "./utils/updater";
import { onceReady } from "./webpack";
import { SettingsRouter } from "./webpack/common";
@@ -56,8 +56,12 @@ async function init() {
permanent: true,
noPersist: true,
onClick() {
- if (needsFullRestart)
- window.DiscordNative.app.relaunch();
+ if (needsFullRestart) {
+ if (IS_DISCORD_DESKTOP)
+ window.DiscordNative.app.relaunch();
+ else
+ window.VencordDesktop.app.relaunch();
+ }
else
location.reload();
}
@@ -96,7 +100,7 @@ async function init() {
init();
-if (!IS_WEB && Settings.winNativeTitleBar && navigator.platform.toLowerCase().startsWith("win")) {
+if (IS_DISCORD_DESKTOP && Settings.winNativeTitleBar && navigator.platform.toLowerCase().startsWith("win")) {
document.addEventListener("DOMContentLoaded", () => {
document.head.append(Object.assign(document.createElement("style"), {
id: "vencord-native-titlebar-style",