Verified Commit eda2c0d9 authored by Laurent Heirendt's avatar Laurent Heirendt
Browse files

changes in js

parent 20017871
......@@ -97,16 +97,16 @@ $( document ).ready(function() {
var cookieArray = decodeURIComponent(document.cookie).split('; ');
cookieArray.forEach(cookie => {
if (cookie.indexOf(name) == 0) {
lapCookieAgree = cookie.substring(name.length, cookie.length);
lapCookieAgree = parseInt(cookie.substring(name.length, cookie.length));
}
});
// logic
if (lapCookieAgree == '0') {
if (lapCookieAgree == 0) {
/* visitor refused cookies => remove Matomo trace if present */
jQuery('.lap-cookies-refuse').addClass('disabled');
clearCookies();
} else if (lapCookieAgree == '1') {
} else if (lapCookieAgree == 1) {
/* visitor accepted cookies => load Matomo */
jQuery('.lap-cookies-accept').addClass('disabled');
loadMatomo();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment