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>
|
<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";
|
||||||
|
Reference in New Issue
Block a user