improving first load

master
Mark MacKay 2021-06-21 13:36:38 -05:00
parent 85c94ac4f8
commit 850ce68c63
1 changed files with 2 additions and 1 deletions

View File

@ -1,7 +1,8 @@
(function(){
const canvasContent = localStorage.getItem("md-canvasContent");
const isDark = localStorage.getItem("md-darkmode");
if (!isDark) document.body.classList.add("inverted");
console.log(isDark)
if (!isDark && isDark !== null) document.body.classList.add("inverted");
if (!canvasContent) return;
const parser = new DOMParser();
const doc = parser.parseFromString(canvasContent, "image/svg+xml");