function openPolicyPopup() { if(getCookie("consentGiven") === "true") return; $("#mind-policy-popup").fadeIn(300); // Enable the div } function agreePolicyPopup() { const _paq = window._paq || []; _paq.push(['forgetUserOptOut']); _paq.push(['rememberConsentGiven', 43800]); _paq.push(['rememberCookieConsentGiven']); $("#mind-policy-popup").fadeOut(300); // Disable the div setCookie("consentGiven", "true", 1825); // todo: check if already present? also, firefox was throwing a warning... } function getCookie(cname) { const name = cname + "="; const decodedCookie = decodeURIComponent(document.cookie); const ca = decodedCookie.split(';'); for(let i = 0; i