mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-29 03:53:30 +08:00
fix(colorScheme): dispatch onColorSchemeChange at page load
This commit is contained in:
parent
1ec73b2d76
commit
d98776a013
@ -9,6 +9,8 @@ class StackColorScheme {
|
||||
this.bindMatchMedia();
|
||||
this.currentScheme = this.getSavedScheme();
|
||||
|
||||
this.dispatchEvent(document.body.dataset.scheme as colorScheme);
|
||||
|
||||
if (toggleEl)
|
||||
this.bindClick(toggleEl);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user