Fix: Expose uncloseai.js functions to global scope

Exposed , , , , , , , , , and  functions to the global  object. This resolves  issues when these functions are called directly from HTML  attributes, particularly in .
This commit is contained in:
Russell Ballestrini 2025-06-30 19:03:22 -04:00
parent a5fd6902ba
commit 7a6996bc30

View file

@ -1998,6 +1998,18 @@ Format: Start with "Greetings! I'm Hermes..." and make it sound natural and enga
const sendButton = document.createElement('button');
sendButton.textContent = 'Send';
// Expose functions to the global scope for direct HTML calls
window.handleUserInput = handleUserInput;
window.readPageWithHermes = readPageWithHermes;
window.openTTSModal = openTTSModal;
window.handleTTSFromElement = handleTTSFromElement;
window.handleUploadFromElement = handleUploadFromElement;
window.uploadFile = uploadFile;
window.showProgressIndicator = showProgressIndicator;
window.hideProgressIndicator = hideProgressIndicator;
window.sendMessage = sendMessage;
window.speakText = speakText;
if (USE_CUSTOM_STYLING) {
sendButton.style.cssText = `
padding: 12px 24px;