diff --git a/site/assets/js/tac.js b/site/assets/js/tac.js index 94aace520d..a5b41de509 100644 --- a/site/assets/js/tac.js +++ b/site/assets/js/tac.js @@ -45,10 +45,10 @@ "googletagmanager_added", function () { var ask = document.querySelector( - "#googletagmanagerLine .tarteaucitronAsk" + '#googletagmanagerLine .tarteaucitronAsk' ); var choiceEvent = - "tarteaucitron.userInterface.respond(document.getElementById('googletagmanagerAllowed'),document.getElementById('googletagmanagerAllowed').checked);"; + 'tarteaucitron.userInterface.respond(document.getElementById("googletagmanagerAllowed"),document.getElementById("googletagmanagerAllowed").checked);'; var toggle = document .createRange() .createContextualFragment( @@ -59,22 +59,22 @@ ask.innerHTML = ""; ask.append(toggle); - var allowConsentButton = document.querySelector(".tarteaucitronAllow"); - var denyConsentButton = document.querySelector(".tarteaucitronDeny"); - var checkboxes = document.querySelectorAll(".form-check-input"); + var allowConsentButton = document.querySelector('.tarteaucitronAllow') + var denyConsentButton = document.querySelector('.tarteaucitronDeny') + var checkboxes = document.querySelectorAll('.form-check-input') [allowConsentButton].forEach(function (button) { - button.addEventListener("click", function () { + button.addEventListener('click', function () { for (var i = 0; i < checkboxes.length; i++) { if (!checkboxes.checked) { checkboxes[i].checked = true; } } - }); + }) }); [denyConsentButton].forEach(function (button) { - button.addEventListener("click", function () { + button.addEventListener('click', function () { for (var i = 0; i < checkboxes.length; i++) { if (checkboxes.checked !== true) { checkboxes[i].checked = false;