From c2f5f4941c7babaa5675fc5483116207fd889ce9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenzo=20Dellac=C3=A0?= Date: Fri, 10 Jul 2020 12:29:50 +0200 Subject: [PATCH] fixed conflicting cookie names --- scripts/policy-popup.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/policy-popup.js b/scripts/policy-popup.js index b5b5d2c..1dd54f4 100644 --- a/scripts/policy-popup.js +++ b/scripts/policy-popup.js @@ -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) {