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

linting

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