Verified Commit 6a744d48 authored by Laurent Heirendt's avatar Laurent Heirendt
Browse files

linting

parent a6a80e51
...@@ -13,18 +13,20 @@ function loadMatomo() { ...@@ -13,18 +13,20 @@ function loadMatomo() {
_paq.push(['trackPageView']); _paq.push(['trackPageView']);
_paq.push(['setIgnoreClasses', ['no-tracking', 'colorbox']]); _paq.push(['setIgnoreClasses', ['no-tracking', 'colorbox']]);
_paq.push(['enableLinkTracking']); _paq.push(['enableLinkTracking']);
var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0]; var d = document,
g = d.createElement('script'),
s = d.getElementsByTagName('script')[0];
g.type = 'text/javascript'; g.type = 'text/javascript';
g.defer = true; g.defer = true;
g.async = true; g.async = true;
g.src = u + 'matomo.js'; g.src = u + 'matomo.js';
s.parentNode.insertBefore(g,s); s.parentNode.insertBefore(g, s);
setResultText(true); setResultText(true);
} }
} }
/* setResultText: change the text in the footer */ /* setResultText: change the text in the footer */
function setResultText(acceptCookies){ function setResultText(acceptCookies) {
if (acceptCookies === true) { if (acceptCookies === true) {
$('#gdpr-result-text').html(settings.accept_all_text); $('#gdpr-result-text').html(settings.accept_all_text);
} else { } else {
...@@ -70,8 +72,8 @@ function setCookie(name, value) { ...@@ -70,8 +72,8 @@ function setCookie(name, value) {
document.cookie = name + '=' + value + ';expires=' + date.toGMTString() + ';path=/'; document.cookie = name + '=' + value + ';expires=' + date.toGMTString() + ';path=/';
} }
function isCookieSetTo(val){ function isCookieSetTo(val) {
return document.cookie.indexOf(settings.cookieName + '=1' ) > -1; return document.cookie.indexOf(settings.cookieName + '=1') > -1;
} }
/* hasConsent: check if user gave consent */ /* hasConsent: check if user gave consent */
...@@ -125,15 +127,15 @@ function refuse(cookieMgmt) { ...@@ -125,15 +127,15 @@ function refuse(cookieMgmt) {
} }
/* main function */ /* main function */
$( document ).ready(function() { $(document).ready(function() {
// accept // accept
$('.lap-cookies-accept').click(function(e){ $('.lap-cookies-accept').click(function(e) {
e.preventDefault(true); e.preventDefault(true);
accept(); accept();
}); });
// refuse // refuse
$('.lap-cookies-refuse').click(function(e){ $('.lap-cookies-refuse').click(function(e) {
e.preventDefault(true); e.preventDefault(true);
refuse(); refuse();
}); });
......
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