Implement system theme check in checkDarkLightMode

This commit is contained in:
Evan Brierton 2021-11-29 13:28:01 +00:00
parent 80b4d68835
commit 7e59834be4
No known key found for this signature in database
GPG key ID: EEB49EB91D2A0E70

View file

@ -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