This commit is contained in:
2026-02-26 10:04:20 +01:00
parent bc3ea9212e
commit bcbe3c67ce

View File

@@ -427,6 +427,17 @@ async function init() {
bindEvents(); bindEvents();
document.documentElement.classList.add('loaded'); document.documentElement.classList.add('loaded');
// Auto-open chat if URL contains ?open_chat parameter
// Usage: dekra.optki.de/?open_chat=true (defaults to truck)
// dekra.optki.de/?open_chat=truck
// dekra.optki.de/?open_chat=family
const urlParams = new URLSearchParams(window.location.search);
const openChatParam = urlParams.get('open_chat');
if (openChatParam) {
const entry = (openChatParam === 'family') ? 'family' : 'truck';
setTimeout(() => openChat(entry), 300);
}
} }
document.readyState === 'loading' document.readyState === 'loading'