Add function to remove consent

This commit is contained in:
Lorenzo Dellacà 2021-03-16 17:41:44 +01:00
parent 6af0e8208c
commit 29ca10e4dd

View File

@ -13,6 +13,14 @@ function agreePolicyPopup() {
setCookie("consentGiven", "true", 1825); // todo: check if already present? also, firefox was throwing a warning...
}
function removeConsent()
{
const _paq = window._paq || [];
_paq.push(['optUserOut']);
$("#mind-policy-popup").fadeIn(300); // Enable the div
setCookie("consentGiven", "false", 1825);
}
function getCookie(cname) {
const name = cname + "=";
const decodedCookie = decodeURIComponent(document.cookie);