mirror of
https://codeberg.org/kirche-im-netz/Startodon-Hub.git
synced 2025-08-28 13:58:14 +02:00
Popup blockiert nicht das Laden der Seite.
This commit is contained in:
parent
5a76a237bf
commit
bbf62515a9
1 changed files with 4 additions and 5 deletions
|
@ -5,21 +5,20 @@ import { loadPostwall } from './components/postwall.js';
|
||||||
import { checkConsent, setUserConsent, showConsentPopup } from './utils/consent-utils.js';
|
import { checkConsent, setUserConsent, showConsentPopup } from './utils/consent-utils.js';
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', async function () {
|
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();
|
const consent = checkConsent();
|
||||||
if (!consent) {
|
if (!consent) {
|
||||||
showConsentPopup(
|
showConsentPopup(
|
||||||
() => {
|
() => {
|
||||||
setUserConsent(true);
|
setUserConsent(true);
|
||||||
initializeApp();
|
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
setUserConsent(false);
|
setUserConsent(false);
|
||||||
initializeApp();
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
} else {
|
|
||||||
initializeApp();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue