meow
This commit is contained in:
1 parent
542827f333
commit
4671c0e292
1 file changed
+12
-14
+12
-14
@@ -1,18 +1,16 @@
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
const toggleBtn = document.getElementById("chatbot-toggle-btn");
|
||||
const closeBtn = document.getElementById("chatbot-close-btn");
|
||||
const chatWindow = document.getElementById("chatbot-window");
|
||||
const chatForm = document.getElementById("chatbot-input-form");
|
||||
const inputField = document.getElementById("chatbot-input-field");
|
||||
const messagesContainer = document.getElementById("chatbot-messages");
|
||||
const pulseDot = document.querySelector(".pulse-notification-dot");
|
||||
const toggleBtn = document.getElementById("chatbot-toggle-btn");
|
||||
const closeBtn = document.getElementById("chatbot-close-btn");
|
||||
const chatWindow = document.getElementById("chatbot-window");
|
||||
const chatForm = document.getElementById("chatbot-input-form");
|
||||
const inputField = document.getElementById("chatbot-input-field");
|
||||
const messagesContainer = document.getElementById("chatbot-messages");
|
||||
const pulseDot = document.querySelector(".pulse-notification-dot");
|
||||
|
||||
// Initialize the new JavaScript intent matching engine using injected PHP data
|
||||
// We add a safety check in case chatbot-engine.js failed to load
|
||||
if (typeof window.PortfolioChatEngine === 'undefined') {
|
||||
// Initialize the new JavaScript intent matching engine using injected PHP data
|
||||
// We add a safety check in case chatbot-engine.js failed to load
|
||||
if (typeof window.PortfolioChatEngine === 'undefined') {
|
||||
console.error("Chat engine not loaded");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
const engine = new window.PortfolioChatEngine(window.portfolioData || {});
|
||||
let isWaiting = false;
|
||||
|
||||
@@ -162,4 +160,4 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
|
||||
return text;
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user