Merge remote-tracking branch 'upstream/dev' into dev

This commit is contained in:
thororen1234 2025-06-06 19:22:24 -04:00
commit 3e9e1722fd
No known key found for this signature in database
14 changed files with 124 additions and 60 deletions

View file

@ -39,7 +39,7 @@ async function initSystemValues() {
createStyle("vencord-os-theme-values").textContent = `:root{${variables}}`;
}
export async function toggle(isEnabled: boolean) {
async function toggle(isEnabled: boolean) {
if (!style) {
if (isEnabled) {
style = createStyle("vencord-custom-css");
@ -92,6 +92,8 @@ async function initThemes() {
}
document.addEventListener("DOMContentLoaded", () => {
if (IS_USERSCRIPT) return;
initSystemValues();
initThemes();
@ -104,9 +106,11 @@ document.addEventListener("DOMContentLoaded", () => {
if (!IS_WEB) {
VencordNative.quickCss.addThemeChangeListener(initThemes);
}
});
}, { once: true });
export function initQuickCssThemeStore() {
if (IS_USERSCRIPT) return;
initThemes();
let currentTheme = ThemeStore.theme;