fixed conflicting cookie names

This commit is contained in:
Bea 2020-07-10 12:29:50 +02:00
parent d1cb30a010
commit c2f5f4941c

View File

@ -1,5 +1,5 @@
function openPolicyPopup() {
if(getCookie("consent") === "true") return;
if(getCookie("consentGiven") === "true") return;
$("#policy-popup").fadeIn(1000); // Enable the div
}
@ -8,7 +8,7 @@ function agreePolicyPopup() {
const _paq = window._paq || [];
_paq.push(['rememberConsentGiven']); // todo: check if this works
$("#policy-popup").fadeOut(1000); // Disable the div
document.cookie = "consent=true"; // todo: check if already present? also, firefox was throwing a warning...
document.cookie = "consentGiven=true"; // todo: check if already present? also, firefox was throwing a warning...
}
function getCookie(cname) {