mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2025-08-05 08:13:40 +00:00
Fix utterances theme check
This commit is contained in:
@@ -6,12 +6,15 @@
|
||||
|
||||
<script>
|
||||
// load comments
|
||||
var getTheme =
|
||||
(localStorage && localStorage.getItem("theme")) ||
|
||||
(window.matchMedia &&
|
||||
window.matchMedia("(prefers-color-scheme: light)").matches)
|
||||
var getTheme = localStorage && localStorage.getItem("theme");
|
||||
|
||||
getTheme =
|
||||
getTheme == null
|
||||
? window.matchMedia &&
|
||||
window.matchMedia("(prefers-color-scheme: light)").matches
|
||||
? "light"
|
||||
: "dark";
|
||||
: "dark"
|
||||
: getTheme;
|
||||
getTheme = getTheme == null ? "dark" : getTheme;
|
||||
|
||||
let theme = getTheme === "dark" ? "gruvbox-dark" : "github-light";
|
||||
|
Reference in New Issue
Block a user