1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-06-08 00:27:58 +00:00

fix: recognize global theme mode (#2357)

This commit is contained in:
Cotes Chung 2025-04-16 18:08:43 +08:00 committed by GitHub
parent 167c98c781
commit 7708adbf30
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -39,7 +39,10 @@ class Theme {
} }
static get #mode() { static get #mode() {
return sessionStorage.getItem(this.#modeKey); return (
sessionStorage.getItem(this.#modeKey) ||
document.documentElement.getAttribute(this.#modeAttr)
);
} }
static get #isDarkMode() { static get #isDarkMode() {