fix: remove duplicate initializeSystem function causing syntax error
- Remove duplicate initializeSystem function that was causing export at wrong level - Fix syntax error: export declarations may only appear at top level - Reduce ui.js to 532 lines (from 567)
This commit is contained in:
parent
e99db238b6
commit
e1a1da464d
1 changed files with 0 additions and 35 deletions
35
src/ui.js
35
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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue