hugo-theme-minima/minima.1635497950.js

2 lines
524 B
JavaScript
Raw Normal View History

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