diff --git a/src/ui.js b/src/ui.js index 69f52a1..d0b77c3 100644 --- a/src/ui.js +++ b/src/ui.js @@ -491,41 +491,6 @@ function setupFloatingButtonHandler(floatingButton) { // Modal functions extracted to uncloseai-embed-modal.js -export function initializeSystem() { - // Check for skip init flag - allow partial initialization for preview windows - if (window.UNCLOSEAI_SKIP_INIT === true) { - console.log("uncloseai.js: Partial initialization for preview window"); - // Only create floating button in preview windows if not explicitly disabled - if (window.UNCLOSEAI_FLOATING_BUTTON !== false) { - console.log("uncloseai.js: Creating floating button in preview window"); - // Ensure DOM is ready before creating button - if (document.readyState === "loading") { - document.addEventListener("DOMContentLoaded", createFloatingAIButton); - } else { - createFloatingAIButton(); - } - } - return; - } - - console.log("uncloseai.js: Full initialization"); - initializeChatInterface(); - - // Only create floating button if not disabled - if (SHOW_FLOATING_BUTTON) { - console.log( - "uncloseai.js: SHOW_FLOATING_BUTTON is true, calling createFloatingAIButton()", - ); - createFloatingAIButton(); - } else { - console.log( - "uncloseai.js: SHOW_FLOATING_BUTTON is false, not creating floating button.", - ); - } - - // Initialize class-based elements - initializeUncloseaiElements(); - export function initializeSystem() { // Check for skip init flag - allow partial initialization for preview windows if (window.UNCLOSEAI_SKIP_INIT === true) {