Fix utterances theme check

This commit is contained in:
Dave Gallant
2024-01-22 19:36:25 -05:00
parent a56eeeb528
commit 8f0cec9739

View File

@@ -6,12 +6,15 @@
<script> <script>
// load comments // load comments
var getTheme = var getTheme = localStorage && localStorage.getItem("theme");
(localStorage && localStorage.getItem("theme")) ||
(window.matchMedia && getTheme =
window.matchMedia("(prefers-color-scheme: light)").matches) getTheme == null
? "light" ? window.matchMedia &&
: "dark"; window.matchMedia("(prefers-color-scheme: light)").matches
? "light"
: "dark"
: getTheme;
getTheme = getTheme == null ? "dark" : getTheme; getTheme = getTheme == null ? "dark" : getTheme;
let theme = getTheme === "dark" ? "gruvbox-dark" : "github-light"; let theme = getTheme === "dark" ? "gruvbox-dark" : "github-light";