From 4918d699d56ce29168b50965f288aaa681d97b27 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Tue, 28 Feb 2023 22:17:39 +0100 Subject: Windows: Add Option to use native titlebar ~ Closes #537 --- src/Vencord.ts | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/Vencord.ts') 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 }); +} -- cgit