aboutsummaryrefslogtreecommitdiff
path: root/src/Vencord.ts
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2023-02-28 22:17:39 +0100
committerVendicated <vendicated@riseup.net>2023-02-28 22:17:39 +0100
commit4918d699d56ce29168b50965f288aaa681d97b27 (patch)
tree3a7dd3ccdd037bce1e4911936bcdf3292b86d654 /src/Vencord.ts
parent5ec517875e0725b66805b939e5379c23a5e40ceb (diff)
downloadVencord-4918d699d56ce29168b50965f288aaa681d97b27.tar.gz
Vencord-4918d699d56ce29168b50965f288aaa681d97b27.tar.bz2
Vencord-4918d699d56ce29168b50965f288aaa681d97b27.zip
Windows: Add Option to use native titlebar ~ Closes #537
Diffstat (limited to 'src/Vencord.ts')
-rw-r--r--src/Vencord.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Vencord.ts b/src/Vencord.ts
index ac8579b..ba7d01f 100644
--- a/src/Vencord.ts
+++ b/src/Vencord.ts
@@ -95,3 +95,12 @@ async function init() {
}
init();
+
+if (!IS_WEB && Settings.winNativeTitleBar && navigator.platform.toLowerCase().startsWith("win")) {
+ document.addEventListener("DOMContentLoaded", () => {
+ document.head.append(Object.assign(document.createElement("style"), {
+ id: "vencord-native-titlebar-style",
+ textContent: "[class*=titleBar-]{display: none!important}"
+ }));
+ }, { once: true });
+}