From 7a6996bc3083196d8d883df585a8f795eb313e9a Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Mon, 30 Jun 2025 19:03:22 -0400 Subject: [PATCH] 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 . --- uncloseai.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/uncloseai.js b/uncloseai.js index 47334aa..545d1a0 100644 --- a/uncloseai.js +++ b/uncloseai.js @@ -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;