mirror of
https://github.com/danbulant/dribbblish-dynamic-theme
synced 2026-06-20 07:01:13 +00:00
Implement system theme check in checkDarkLightMode
This commit is contained in:
parent
80b4d68835
commit
7e59834be4
1 changed files with 3 additions and 0 deletions
|
|
@ -512,6 +512,9 @@ Dribbblish.on("ready", () => {
|
|||
else dark = start <= time && time < end;
|
||||
toggleDark(dark);
|
||||
}
|
||||
if (theme === "system") {
|
||||
toggleDark(window.matchMedia("(prefers-color-scheme: dark)").matches);
|
||||
}
|
||||
}
|
||||
|
||||
// Run every Minute to check time and set dark / light mode
|
||||
|
|
|
|||
Loading…
Reference in a new issue