mirror of https://github.com/luizdepra/hugo-coder.git

tianheg
25.34.2021 2ae5eec336998bb804831957fa7e5888851b0ee8
fix word (#507)

* fix word

* Update CONTRIBUTORS.md

add @tianheg (my name)
2 files modified
3 ■■■■ changed files
CONTRIBUTORS.md 1 ●●●● patch | view | raw | blame | history
assets/js/dark-mode.js 2 ●●● patch | view | raw | blame | history
CONTRIBUTORS.md
@@ -88,6 +88,7 @@
- [Arafat Hasan](https://github.com/arafat-hasan)
- [YUJI](https://yuji.ne.jp/)
- [JaeSang Yoo](https://github.com/JSYoo5B)
- [tianheg](https://github.com/tianheg)
- [Felix](https://github.com/lazyyz)
- [Peter Duchnovsky](https://pduchnovsky.com)
- [Alex Miranda](https://ammiranda.com)
assets/js/dark-mode.js
@@ -2,7 +2,7 @@
const darkModeToggle = document.getElementById('dark-mode-toggle');
const darkModeMediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
// Check if user preference is set, if not check value of body class for light or dark else it means that colorsheme = auto
// Check if user preference is set, if not check value of body class for light or dark else it means that colorscheme = auto
if (localStorage.getItem("colorscheme")) {
  setTheme(localStorage.getItem("colorscheme"));
} else if (body.classList.contains('colorscheme-light') || body.classList.contains('colorscheme-dark')) {