From eae7cefae137fc06759c5414b85ea8b23bd35ec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Wed, 24 Jun 2020 23:00:26 +0200 Subject: [PATCH] MAPG-172 don't close the cookie DIV if not the agree button was clicked --- views/templates/main_footer.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/views/templates/main_footer.php b/views/templates/main_footer.php index cbb8457..f50b108 100644 --- a/views/templates/main_footer.php +++ b/views/templates/main_footer.php @@ -29,10 +29,13 @@ document.cookie = 'COOKIES_CONSENT=1; expires=' + expirationDate + '; path=/'; MapGuesser.cookiesAgreed = true; - document.getElementById('cookiesNotice').style.display = 'none'; } }; + document.getElementById('agreeCookies').onclick = function () { + document.getElementById('cookiesNotice').style.display = 'none'; + }; + window.onclick = function () { MapGuesser.agreeCookies(); };