document.addEventListener("DOMContentLoaded", function() { setDarkMode() }) function setCookie(cname, cvalue, exdays) { document.cookie = cname + "=" + cvalue + ";path=/"; } function getCookie(cname) { let name = cname + "="; let decodedCookie = decodeURIComponent(document.cookie); let ca = decodedCookie.split(';'); for(let i = 0; i