Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions website/assets/js/cookie-banner.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ window.addEventListener('load', function () {
divB.style = "position:fixed; bottom:0px; right:0px; width:100%;";
document.body.appendChild(divA);
document.body.appendChild(divB);

// update Cookie link
this.setTimeout(function () {
const banner = document.getElementById('consent-banner');
Expand All @@ -25,7 +25,7 @@ window.addEventListener('load', function () {
prefsElement.className = cookieLink.className;

if (banner) {
// listen for click and remove banner to avoid interfering with
// listen for click and remove banner to avoid interfering with
document.addEventListener('click', function (event) {
const targetElement = event.target;
if (targetElement.matches('#truste-consent-required') || targetElement.matches('#truste-consent-button')) {
Expand All @@ -38,4 +38,4 @@ window.addEventListener('load', function () {
return (cookieLink && document.getElementById('teconsent').innerHTML.length > 0) ? cookieLink.replaceWith(prefsElement) : false;
}, 200);
}
});
});