Popup blockiert nicht das Laden der Seite.

This commit is contained in:
Alexander Müller 2024-12-29 12:24:22 +01:00
parent 5a76a237bf
commit bbf62515a9

View file

@ -5,21 +5,20 @@ import { loadPostwall } from './components/postwall.js';
import { checkConsent, setUserConsent, showConsentPopup } from './utils/consent-utils.js';
document.addEventListener('DOMContentLoaded', async function () {
// Überprüfe Consent, bevor Inhalte geladen werden
// Starte sofort den Seitenaufbau
initializeApp();
// Überprüfe parallel den Consent-Status
const consent = checkConsent();
if (!consent) {
showConsentPopup(
() => {
setUserConsent(true);
initializeApp();
},
() => {
setUserConsent(false);
initializeApp();
}
);
} else {
initializeApp();
}
});