var me = document.getElementById('div_ticket_layout2_127');
if (!me) {
me = document.getElementById('ticket_layout2_127');
}
if (me) {
var textnode = document.createElement('div');
textnode.id = 'div_ticket_layout2_127';
textnode.scriptSrc = '//app.eaero.de/api/ticket/layout2/127/edf3182d097d714f58928808b82106b4?scriptId=ticket_layout2_127';
textnode.innerHTML = '
Reisemobilstellplatz
Preis
Stellplatzgebühr (mit bis zu 2 Personen)
€ 18,00
jede weitere Person
€ 3,00
Kinder unter 3
€ 0,00
Nutzung der Schmutzwasserstation
€ 4,00
Pfand für die SmartCard
€ 5,00
Stellplatzgebühr (mit bis zu 2 Personen): inklusive Strom und Frischwasserversorgung sowie Grau- und Schmutzwasserentsorgung. Aufenthaltsdauer: maximal 5 Tage.
Nutzung der Schmutzwasserstation: Die Station kann auch von Personen genutzt werden, die kein Gast auf dem Wohnmobilstellplatz sind. Hierzu bitte an der Kasse eine SmartCard mit entsprechendem Betrag ausleihen, nutzen und wieder zurückbringen.
';
me.parentNode.replaceChild(textnode, me);
}
else {
// typ und id suchen
var scripts = document.getElementsByTagName("script");
var src = '//app.eaero.de/api/ticket/layout2/127/edf3182d097d714f58928808b82106b4?scriptId=ticket_layout2_127';
console.log(src);
var type = '';
var id = '';
var pos1ticket = src.indexOf('/api/ticket/');
var offset = 0;
var idInNext = false;
var template = '/';
var pos1 = -1;
if(pos1ticket > -1) {
pos1 = pos1ticket;
offset = 12;
idInNext = true;
type = 'ticket';
}
if(pos1 > -1) {
var pos2 = src.indexOf('/', pos1 + offset);
if(!idInNext) {
id = src.substring(pos1 + offset, pos2);
}
else {
var pos2Back = pos2 + 1;
template = '/' + src.substring(pos1 + offset, pos2) + '/';
pos2 = src.indexOf('/', pos2 + 1);
id = src.substring(pos2Back, pos2);
}
console.log(type);
console.log(id);
console.log(template);
}
// /typ und id suchen
var scriptNodeReplaced = false;
var html = '
Reisemobilstellplatz
Preis
Stellplatzgebühr (mit bis zu 2 Personen)
€ 18,00
jede weitere Person
€ 3,00
Kinder unter 3
€ 0,00
Nutzung der Schmutzwasserstation
€ 4,00
Pfand für die SmartCard
€ 5,00
Stellplatzgebühr (mit bis zu 2 Personen): inklusive Strom und Frischwasserversorgung sowie Grau- und Schmutzwasserentsorgung. Aufenthaltsdauer: maximal 5 Tage.
Nutzung der Schmutzwasserstation: Die Station kann auch von Personen genutzt werden, die kein Gast auf dem Wohnmobilstellplatz sind. Hierzu bitte an der Kasse eine SmartCard mit entsprechendem Betrag ausleihen, nutzen und wieder zurückbringen.
Stellplatzgebühr (mit bis zu 2 Personen): inklusive Strom und Frischwasserversorgung sowie Grau- und Schmutzwasserentsorgung. Aufenthaltsdauer: maximal 5 Tage.
Nutzung der Schmutzwasserstation: Die Station kann auch von Personen genutzt werden, die kein Gast auf dem Wohnmobilstellplatz sind. Hierzu bitte an der Kasse eine SmartCard mit entsprechendem Betrag ausleihen, nutzen und wieder zurückbringen.
');
}
if('withEQCSS' == 'withEQCSS') {
var bodyElement = document.getElementsByTagName('body')[0];
var bodyEQCSS = bodyElement.getAttribute('eqcss');
if(bodyEQCSS == null) {
//console.log('body eqcss: ' + bodyElement.getAttribute('eqcss'));
bodyElement.setAttribute('eqcss', 'eqcss');
//!!console.log(typeof(EQCSS));
if(typeof(EQCSS) === 'undefined') {
//!!console.log('EQCSS laden');
var wol = window.onload;
window.onload = function() {
if(wol) {
wol();
}
var link = document.getElementsByTagName('link');
var script = document.getElementsByTagName('script');
for (var i = 0; i < link.length; i++) {
link[i].setAttribute('data-eqcss-read', 'true')
}
for (var i = 0; i < script.length; i++) {
script[i].setAttribute('data-eqcss-read', 'true')
}
eaApiLoadScript('//app.eaero.de/app.php/js/EQCSS.min.js', function() {
if(typeof(EQCSS) !== 'undefined') {
//console.log('EQCSS apply');
EQCSS.apply();
}
});
};
}
else {
if(typeof(EQCSS) !== 'undefined') {
//console.log('EQCSS apply');
EQCSS.apply();
}
}
}
else {
if(typeof(EQCSS) !== 'undefined') {
//console.log('EQCSS apply');
EQCSS.apply();
}
}
}
if('withEQCSS' == 'withEQCSS' && '' != 'withoutMouseUpListener') {
if(window.eAeroMouseupInstalled === undefined) {
window.eAeroMouseupInstalled = true;
document.addEventListener("mouseup", function(e) {
console.log('mouseup');
setTimeout(function() {
console.log('EQCSS apply mouseup');
EQCSS.apply();
}, 1);
});
}
}
function eaApiLoadScript(url, callback) {
// script-Tag anlegen
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = url;
// Callback-Funktion binden
//script.onreadystatechange = callback; // Probleme mit IE < 11, daher auskommentiert
script.onload = callback;
// Script-Tag im Header anlegen, damit Ladevorgang beginnt
head.appendChild(script);
}
if (eaeroApi == undefined) {
var eaeroApi = {};
// Lädt und aktualisiert Öffnungszeiten für mehrere IDs über ein API-Script.
eaeroApi.updateMultipleHours = function (idArr, template, date, clear, withDayAfterTomorrow, withFootnotes, withLegend) {
// todo: prüfen, ob dies ev. auch im head-Element funktioniert
var bodyElement = document.getElementsByTagName('body')[0];
if(!bodyElement && bodyElement == undefined) {
console.log('Fehler in der Implementierung der eaero-API. Kein Body-Element gefunden. Script wird eventuell zu früh geladen.');
return
}
if (!withDayAfterTomorrow || withDayAfterTomorrow == undefined) {
withDayAfterTomorrow = 0;
}
if (!withFootnotes || withFootnotes == undefined) {
withFootnotes = 0;
}
if (!withLegend || withLegend == undefined) {
withLegend = 0;
}
var src = '{url}/api/multiHours/' + template + '/' + idArr + '/' + date + '/{secret}';
var params = '';
if(withDayAfterTomorrow != 0) {
if(params == '') params += '?'; else params += '&';
params += 'withDayAfterTomorrow=1';
}
if(withFootnotes != 0) {
if(params == '') params += '?'; else params += '&';
params += 'withFootnotes=1';
}
if(withLegend != 0) {
if(params == '') params += '?'; else params += '&';
params += 'withLegend=1';
}
src += params;
var s = document.createElement("script");
s.type = "text/javascript";
s.src = src;
if (clear) {
for (var i = 0; i < idArr.length; i++) {
var divId = 'div_hours' + idArr[i];
var div = document.getElementById(divId);
if (div && div != undefined) {
div.innerHTML = '';
}
}
}
bodyElement.appendChild(s);
};
// Lädt und aktualisiert Öffnungszeiten für eine einzelne ID über ein API-Script.
eaeroApi.updateHours = function (scriptId, id, template, date, clear, withDayAfterTomorrow, withFootnotes, withLegend) {
var divElement = document.getElementById('div_' + scriptId);
if (!divElement || divElement == undefined) {
return;
}
if (!withDayAfterTomorrow || withDayAfterTomorrow == undefined) {
withDayAfterTomorrow = 0;
}
if (!withFootnotes || withFootnotes == undefined) {
withFootnotes = 0;
}
if (!withLegend || withLegend == undefined) {
withLegend = 0;
}
var scriptSrc = '';
if (divElement.scriptSrc != undefined) {
scriptSrc = divElement.scriptSrc;
}
else {
scriptSrc = '{url}/api/hours/' + template + '/' + id + '/{secret}';
}
var scriptSrcArr = scriptSrc.split('/');
for (i = 0; i < scriptSrcArr.length; i++) {
if (scriptSrcArr[i] == 'hours') {
scriptSrcArr[i + 3] = date;
}
}
src = scriptSrcArr.join('/');
var params = '';
if(withDayAfterTomorrow != 0) {
if(params != '') params += '?'; else params += '&';
params += 'withDayAfterTomorrow=1';
}
if(withFootnotes != 0) {
if(params != '') params += '?'; else params += '&';
params += 'withFootnotes=1';
}
if(withLegend != 0) {
if(params != '') params += '?'; else params += '&';
params += 'withLegend=1';
}
src += params;
var s = document.createElement("script");
s.type = "text/javascript";
s.src = src;
s.id = 'div_' + scriptId;
if (clear) {
divElement.innerHTML = '';
}
divElement.appendChild(s);
};
// Lädt und aktualisiert eine Tabelle mit Öffnungszeiten.
eaeroApi.updateTableOfHours = function(scriptId, date, clear) {
var divElement = document.getElementById('div_' + scriptId);
var prevButton = document.getElementById('toh_prev_button_' + scriptId);
var nextButton = document.getElementById('toh_next_button_' + scriptId);
var loadIndicator = document.getElementById('toh_load_indicator_' + scriptId);
if (!divElement || divElement == undefined) {
return;
}
if(prevButton) {
prevButton.setAttribute('disabled', 'disabled');
}
if(nextButton) {
nextButton.setAttribute('disabled', 'disabled');
}
if(loadIndicator) {
loadIndicator.setAttribute('style', '');
}
var scriptSrc = '';
if (divElement.scriptSrc != undefined) {
scriptSrc = divElement.scriptSrc;
}
else if(divElement.getAttribute('scriptSrc') != undefined) {
scriptSrc = divElement.getAttribute('scriptSrc');
}
else {
scriptSrc = '{url}/api/tableOfHours/' + scriptId + '/1,2,3,4,5,6,7//{secret}';
}
var scriptSrcArr = scriptSrc.split('/');
for (i = 0; i < scriptSrcArr.length; i++) {
if (scriptSrcArr[i] == 'tableOfHours') {
scriptSrcArr[i + 3] = date;
}
}
src = scriptSrcArr.join('/');
var s = document.createElement("script");
s.type = "text/javascript";
s.src = src;
s.id = 'div_' + scriptId;
if (clear) {
divElement.innerHTML = '';
}
divElement.appendChild(s);
};
// Schließt den Chatbot.
eaeroApi.closeChatBot = function(scriptId) {
eaeroApi.closeOrStartChatBot(scriptId, true);
};
// Startet den Chatbot.
eaeroApi.startChatBot = function(scriptId) {
eaeroApi.closeOrStartChatBot(scriptId, false);
};
// Öffnet oder schließt den Chatbot basierend auf dem Status.
eaeroApi.closeOrStartChatBot = function(scriptId, close) {
var divElement = document.getElementById('div_' + scriptId);
if (!divElement || divElement == undefined) {
return;
}
var sendButton = document.getElementById('ea-send-message-' + scriptId);
var closeButton = document.getElementById('ea-close-bot-' + scriptId);
if(sendButton) {
sendButton.setAttribute('disabled', 'true');
}
if(closeButton) {
closeButton.setAttribute('disabled', 'true');
}
if(!close) {
sessionStorage.removeItem('eaero-hdTicketToken');
}
console.log('updateChatBot-close');
eaeroApi.updateChatBot('chatbot{chatBotId}', sessionStorage.getItem('eaero-hdTicketToken'), null, close);
if(!close) {
eaeroApi.updateChatBot('chatbot{chatBotId}', sessionStorage.getItem('eaero-hdTicketToken'), null);
}
}
// Minimiert oder öffnet den Chatbot und aktualisiert bei Bedarf.
eaeroApi.toggleChat = function(withUpdate) {
if(withUpdate === undefined) {
withUpdate = true;
}
console.log('toggleChat');
var container = document.getElementById('ea-chat-bot-container');
var overlay = document.getElementById('ea-modal-overlay');
container.classList.toggle('minimized');
container.classList.remove('maximized');
container.classList.remove('snapped');
if (container.classList.contains('maximized')) {
overlay.style.display = 'block';
} else {
overlay.style.display = 'none';
}
sessionStorage.setItem('eaero-mini', container.classList.contains('minimized'));
sessionStorage.setItem('eaero-maxi', false);
sessionStorage.setItem('eaero-snap', false);
var panel = document.getElementById('ea-chat');
if(panel !== null) panel.scrollTop = panel.scrollHeight;
if(!container.classList.contains('maximized')) {
eaeroApi.snapInChat(withUpdate);
}
if(!container.classList.contains('minimized')) {
console.log('updateChatBot-toggleChat');
if(withUpdate) eaeroApi.updateChatBot('chatbot{chatBotId}', sessionStorage.getItem('eaero-hdTicketToken'), null);
}
document.getElementById("ea-message").focus();
};
// Maximiert oder verkleinert den Chatbot-Fensterbereich.
eaeroApi.toggleMaximizeChat = function(chatBotId) {
//console.log('toggleMaximizeChat', chatBotId);
var container = document.getElementById('ea-chat-bot-container');
var overlay = document.getElementById('ea-modal-overlay');
container.classList.toggle('maximized');
container.classList.remove('minimized');
container.classList.remove('snapped');
if (container.classList.contains('maximized')) {
overlay.style.display = 'block';
} else {
overlay.style.display = 'none';
}
sessionStorage.setItem('eaero-mini', false);
sessionStorage.setItem('eaero-maxi', container.classList.contains('maximized'));
sessionStorage.setItem('eaero-snap', false);
if(container.classList.contains('maximized')) {
// prüfen, ob im snap-in-container, dann ans wieder zurück zum Script
const chatDivElement = document.getElementById('div_chatbot' + chatBotId);
const chatbotElement = document.querySelector('.ea-chatbot');
if (chatDivElement && chatbotElement) {
// Den Chatbot in das snap-in-Element verschieben
//console.log('appendChild from .ea-chatbot to div_chatbot8');
chatDivElement.appendChild(chatbotElement);
}
}
var panel = document.getElementById('ea-chat');
if(panel !== null) panel.scrollTop = panel.scrollHeight;
if(!container.classList.contains('maximized')) {
eaeroApi.snapInChat();
}
document.getElementById("ea-message").focus();
};
// Verschiebt den Chatbot in die Snap-In-Ansicht, wenn er nicht maximiert ist.
eaeroApi.snapInChatIfNotMaximized = function() {
//console.log('snapInChatIfNotMaximized');
if(sessionStorage.getItem('eaero-maxi') != 'true') {
eaeroApi.snapInChat();
}
};
// Verschiebt den Chatbot in die Snap-In-Ansicht.
eaeroApi.snapInChat = function(withUpdate) {
if(withUpdate === undefined) {
withUpdate = true;
}
console.log('snapInChat');
const snapInElement = document.getElementById('ea-chat-bot-snap-in-container');
const chatbotElement = document.querySelector('.ea-chatbot');
if (snapInElement && chatbotElement) {
// Den Chatbot in das snap-in-Element verschieben
//console.log('appendChild from .ea-chatbot to ea-chat-bot-snap-in-container');
snapInElement.innerHTML = ''; // Inhalt leeren
snapInElement.appendChild(chatbotElement);
var container = document.getElementById('ea-chat-bot-container');
var overlay = document.getElementById('ea-modal-overlay');
container.classList.remove('maximized');
container.classList.remove('minimized');
container.classList.add('snapped');
overlay.style.display = 'none';
sessionStorage.setItem('eaero-mini', false);
sessionStorage.setItem('eaero-maxi', false);
sessionStorage.setItem('eaero-snap', true);
console.log('updateChatBot-snapInChat');
if(withUpdate) eaeroApi.updateChatBot('chatbot{chatBotId}', sessionStorage.getItem('eaero-hdTicketToken'), null);
}
};
eaeroApi.isUpdatingChat = false;
// Aktualisiert den Chatverlauf durch einen API-Request.
eaeroApi.updateChatBot = function(scriptId, hdTicketToken, message, close) {
console.log('updateChatBot');
if(eaeroApi.isUpdatingChat) {
return;
}
if(close === undefined) {
close = false;
}
//console.log('message', message);
//console.log('scriptId', scriptId);
var divElement = document.getElementById('div_' + scriptId);
if (!divElement || divElement == undefined) {
return;
}
if(!close) {
eaeroApi.isUpdatingChat = true;
}
var sendButton = document.getElementById('ea-send-message-' + scriptId);
var closeButton = document.getElementById('ea-close-bot-' + scriptId);
var messageBox = document.getElementById('ea-message');
//console.log('...');
if(sendButton) {
sendButton.setAttribute('disabled', 'true');
}
if(closeButton) {
closeButton.setAttribute('disabled', 'true');
}
if(messageBox) {
messageBox.setAttribute('disabled', 'true');
}
src = '//{host_and_base}/api/chatbot/do/chat/{chatBotId}/{secret}';
src = src.replace(/\/app\.php\//g, '/');
//console.log('src', src);
document.getElementById('ea-message').value = '';
const chatDiv = document.getElementById('ea-chat');
if(message) {
const messageDiv = document.createElement("div");
messageDiv.classList.add("ea-chat-item");
messageDiv.classList.add("ea-chat-role-user");
messageDiv.textContent = message;
chatDiv.appendChild(messageDiv);
}
eaeroApi.typing();
fetch(src, {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
scriptId: scriptId,
hdTicketToken: hdTicketToken,
message: message,
close: close
})
})
.then(response => response.json())
.then(data => {
//console.log("Antwort vom Server:", data);
eaeroApi.isUpdatingChat = false;
handleChatData(data);
if(close && data.history.length === 0) {
// todo: wenn snappedIn, dann Chat mit neuem Request neu starten
var container = document.getElementById('ea-chat-bot-container');
if(container.classList.contains('snapped')) {
console.log('CHAT NEU STARTEN');
eaeroApi.updateChatBot('chatbot{chatBotId}', sessionStorage.getItem('eaero-hdTicketToken'), null);
return
}
eaeroApi.toggleChat(false);
}
if(sendButton) {
sendButton.removeAttribute('disabled');
}
if(closeButton) {
closeButton.removeAttribute('disabled');
}
if(messageBox) {
messageBox.removeAttribute('disabled');
messageBox.focus();
}
})
.catch(error => {
eaeroApi.isUpdatingChat = false;
console.error("Fehler:", error)
});
};
// Sendet ein Formular aus dem Chatbot per API an den Server.
eaeroApi.postChatBotForm = function(scriptId, hdTicketToken, formData) {
console.log('postChatBotForm');
if(close === undefined) {
close = false;
}
//console.log('message', message);
//console.log('scriptId', scriptId);
var divElement = document.getElementById('div_' + scriptId);
if (!divElement || divElement == undefined) {
return;
}
var sendButton = document.getElementById('ea-send-message-' + scriptId);
var closeButton = document.getElementById('ea-close-bot-' + scriptId);
var messageBox = document.getElementById('ea-message');
//console.log('...');
if(sendButton) {
sendButton.setAttribute('disabled', 'true');
}
if(closeButton) {
closeButton.setAttribute('disabled', 'true');
}
if(messageBox) {
messageBox.setAttribute('disabled', 'true');
}
//return;
var src = '//{host_and_base}/api/chatbot/do/postForm/{chatBotId}/{secret}';
src = src.replace(/\/app\.php\//g, '/');
document.getElementById('ea-message').value = '';
document.querySelectorAll('.ea-chat-form button, .ea-chat-form input').forEach(function(element) {
element.disabled = true;
});
document.querySelectorAll('.ea-chat-form-before button, .ea-chat-form-before input').forEach(function(element) {
element.disabled = true;
});
eaeroApi.typing();
fetch(src, {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
scriptId: scriptId,
hdTicketToken: hdTicketToken,
formData: formData,
close: close
})
})
.then(response => response.json())
.then(data => {
//console.log("Antwort vom Server:", data);
handleChatData(data);
if(sendButton) {
sendButton.removeAttribute('disabled');
}
if(closeButton) {
closeButton.removeAttribute('disabled');
}
if(messageBox) {
messageBox.removeAttribute('disabled');
messageBox.focus();
}
})
.catch(error => console.error("Fehler:", error));
};
// Zeigt eine Tipp-Animation im Chatbot an.
eaeroApi.typing = function() {
const chatDiv = document.getElementById('ea-chat');
const typingDiv = document.createElement('div');
typingDiv.className = 'ea-chat-typing-indicator';
typingDiv.innerHTML = `
`;
document.querySelectorAll('.ea-chat-typing-indicator').forEach(el => el.remove());
chatDiv.appendChild(typingDiv);
chatDiv.scrollTop = chatDiv.scrollHeight;
};
if (typeof eAeroApiLoaded == 'function') {
eAeroApiLoaded();
}
eaeroApi.chatbotCheckForUpdateTimeStamp = null;
function handleChatData(data) {
console.log('handleChatData', data);
sessionStorage.setItem('eaero-hdTicketToken', data['hdTicketToken']);
// Element in den Container einfügen
const chatContainer = document.getElementById("ea-chat"); // Ziel-Container im HTML
const chatBotContainer = document.getElementById("ea-chat-bot-container"); // Ziel-Container im HTML
if(!data['isArchived']) {
chatBotContainer.classList.remove('ea-chat-not-in-conversation');
}
else if(data['isArchived']) {
chatBotContainer.classList.add('ea-chat-not-in-conversation');
}
if(data['isInConversation'] !== null && data['isArchived'] !== null && !data['isInConversation'] && !data['isArchived']) {
eaeroApi.chatbotCheckForUpdateTimeStamp = data['timestamp'];
}
else {
eaeroApi.chatbotCheckForUpdateTimeStamp = null;
}
chatContainer.innerHTML = '';
data.history.forEach(chatItem => {
const chatDiv = document.createElement("div");
const innerDiv = document.createElement("div");
// Klasse je nach "in"-Wert setzen
chatDiv.classList.add("ea-chat-item", chatItem.in ? "ea-chat-role-user" : "ea-chat-role-assistant");
innerDiv.classList.add("ea-chat-time");
innerDiv.setAttribute("date", chatItem.timestamp.date);
// Textinhalt setzen
chatDiv.textContent = chatItem.text;
chatDiv.appendChild(innerDiv);
chatContainer.appendChild(chatDiv);
if(!chatItem.in) {
const faceDiv = document.createElement("div");
const faceImg = document.createElement("img");
faceDiv.classList.add("ea-chat-face", chatItem.in ? "ea-chat-face-role-user" : "ea-chat-face-role-assistant");
faceImg.setAttribute("src", "///eaero-chat-bot/images/face.png");
faceDiv.appendChild(faceImg);
chatContainer.appendChild(faceDiv);
}
});
renderChatBot();
initChatForm();
chatBotFormatRelativeTime();
var panel = document.getElementById('ea-chat');
if(panel !== null) panel.scrollTop = panel.scrollHeight;
document.getElementById("ea-message").focus();
}
function chatBotFormatRelativeTime() {
//console.log('chatBotFormatRelativeTime');
const elements = document.querySelectorAll('.ea-chat-time');
elements.forEach(el => {
const timeAttr = el.getAttribute('date');
if (!timeAttr) return;
const dateStr = timeAttr.replace(" ", "T"); // "2025-03-21T14:20:08.000000"
const eventDate = new Date(dateStr);
const now = new Date();
// Zeitdifferenz in Millisekunden
const diffMs = now - eventDate;
const diffSeconds = Math.floor(diffMs / 1000);
const diffMinutes = Math.floor(diffMs / 1000 / 60);
// Format-Helfer
const pad = (num) => String(num).padStart(2, "0");
// Datumsteile
const eventDay = eventDate.getDate();
const eventMonth = eventDate.getMonth();
const eventYear = eventDate.getFullYear();
const nowDay = now.getDate();
const nowMonth = now.getMonth();
const nowYear = now.getFullYear();
let text = "";
if (diffSeconds < 10) {
text = "gerade eben";
} else if (diffSeconds < 60) {
text = `vor ${diffSeconds} Sekunde${diffSeconds === 1 ? "" : "n"}`;
} else if (diffMinutes < 30) {
text = `vor ${diffMinutes} Minute${diffMinutes === 1 ? "" : "n"}`;
} else if (
eventYear === nowYear &&
eventMonth === nowMonth &&
eventDay === nowDay
) {
// gleiches Datum wie heute
text = `um ${pad(eventDate.getHours())}:${pad(eventDate.getMinutes())}`;
} else {
text = `${pad(eventDate.getDate())}.${pad(eventDate.getMonth() + 1)}.${eventDate.getFullYear()} ${pad(eventDate.getHours())}:${pad(eventDate.getMinutes())}`;
}
el.textContent = text;
});
}
function chatBotCheckForUpdates() {
return; // derzeit deaktiviert. Es gbit ein Problem mit dieser Aktualisierung und der Interaktion mit dem Schließen-Button des Chat-Bots
if(eaeroApi.chatbotCheckForUpdateTimeStamp === null) {
return;
}
console.log('chatBotCheckForUpdates', eaeroApi.chatbotCheckForUpdateTimeStamp, eaeroApi.chatBotScriptId);
eaeroApi.updateChatBot(eaeroApi.chatBotScriptId, sessionStorage.getItem('eaero-hdTicketToken'), null);
}
setInterval(chatBotFormatRelativeTime, 1 * 1000);
setInterval(chatBotCheckForUpdates, 10 * 1000);
}