diff --git a/uncloseai.js b/uncloseai.js index 566cf05..ab1f5c9 100644 --- a/uncloseai.js +++ b/uncloseai.js @@ -1153,6 +1153,12 @@ document.getElementById("user-input").addEventListener("keydown", function(event // Function to create floating AI button function createFloatingAIButton() { + // Remove any existing floating button first + const existingButton = document.getElementById('floating-ai-button'); + if (existingButton) { + existingButton.remove(); + } + // Create the main floating button const floatingButton = document.createElement('button'); floatingButton.id = 'floating-ai-button';