diff --git a/src/main/resources/static/js/pages/home.js b/src/main/resources/static/js/pages/home.js index 6c48fe81d4d..098a0bac1a4 100644 --- a/src/main/resources/static/js/pages/home.js +++ b/src/main/resources/static/js/pages/home.js @@ -4,6 +4,19 @@ document.addEventListener('DOMContentLoaded', function () { if (window.analyticsPromptBoolean) { const analyticsModal = new bootstrap.Modal(document.getElementById('analyticsModal')); analyticsModal.show(); + + function hideCookieConsent() { + const cookieConsentElement = + document.querySelector('#cc-main') + + if (cookieConsentElement) { + cookieConsentElement.style.display = "none"; + } else { + // If not found, retry after a short delay + setTimeout(hideCookieConsent, 200); + } + } + hideCookieConsent(); } }); /*]]>*/