a
This commit is contained in:
@@ -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'
|
||||||
|
|||||||
Reference in New Issue
Block a user