mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-08 06:03:03 -04:00
Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
3e9e1722fd
14 changed files with 124 additions and 60 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue