mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-09-12 17:52:13 +02:00
hide cookie banner when analytics pop up shown
This commit is contained in:
parent
49e3706a30
commit
e78fae3512
@ -4,6 +4,20 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
if (window.analyticsPromptBoolean) {
|
if (window.analyticsPromptBoolean) {
|
||||||
const analyticsModal = new bootstrap.Modal(document.getElementById('analyticsModal'));
|
const analyticsModal = new bootstrap.Modal(document.getElementById('analyticsModal'));
|
||||||
analyticsModal.show();
|
analyticsModal.show();
|
||||||
|
|
||||||
|
function hideCookieConsent() {
|
||||||
|
const cookieConsentElement =
|
||||||
|
document.querySelector('#cc-main')
|
||||||
|
|
||||||
|
if (cookieConsentElement) {
|
||||||
|
console.log("cookie hidden")
|
||||||
|
cookieConsentElement.style.display = "none";
|
||||||
|
} else {
|
||||||
|
// If not found, retry after a short delay
|
||||||
|
setTimeout(hideCookieConsent, 200);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
hideCookieConsent();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
/*]]>*/
|
/*]]>*/
|
||||||
|
Loading…
Reference in New Issue
Block a user