ddocument.addEventListener("DOMContentLoaded", function() {
var button = document.querySelector('.ai-popup-button');
if (button) {
button.id = "ai-popup-button"; // Assign the ID that Hustle requires
button.addEventListener("click", function(event) {
event.preventDefault();
if (typeof Hustle !== 'undefined' && Hustle.openPopup) {
Hustle.openPopup(1); // Ensure this matches your popup's actual ID
} else {
console.error("Hustle is not loaded or openPopup function is missing.");
}
});
} else {
console.error("Button with class 'ai-popup-button' not found.");
}
});