mirror of
https://github.com/jaywcjlove/reference.git
synced 2025-06-19 21:51:20 +08:00
chore: update dependency refs-cli to v1.4.1 4d813c765f
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
const LOCAL_NANE = '_dark_mode_theme_'
|
||||
const LOCAL_NANE = '_dark_mode_theme_';
|
||||
const rememberedValue = localStorage.getItem(LOCAL_NANE);
|
||||
if (rememberedValue && ['light', 'dark'].includes(rememberedValue)) {
|
||||
document.documentElement.setAttribute('data-color-mode', rememberedValue);
|
||||
@ -9,4 +9,4 @@ button.onclick = () => {
|
||||
const mode = theme === 'light' ? 'dark' : 'light';
|
||||
document.documentElement.setAttribute('data-color-mode', mode);
|
||||
localStorage.setItem(LOCAL_NANE, mode);
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user