hugo-theme-minima/minima.1636184653.js

2 lines
620 B
JavaScript
Raw Normal View History

(()=>{var o="🌝",a="🌚",t="light",s="dark",c=document.getElementById("theme-switcher");c.innerHTML=localStorage.theme===t?o:a;c.addEventListener("click",function(){let e=localStorage.theme,l=e===t?s:t,{classList:n}=document.documentElement,i=l===t?o:a;n.remove(e),n.add(l),localStorage.theme=l,c.innerHTML=i});document.querySelectorAll(".md ul").forEach(e=>{/<li><input .+>.+<\/li>/.test(e.innerHTML)&&e.classList.add("ul-checkbox")});document.querySelector("body").style.setProperty("--global-font-family","Helvatica, sans-serif");var m="true";m==="false"&&(document.documentElement.style="user-select:none");})();