From 37722fe392ff47d7348bbe9b48ca525bb44af05c Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Mon, 30 Jun 2025 16:55:05 -0400 Subject: [PATCH] fix floating button by removing duplicate check before creation --- uncloseai.js | 6 ++++++ 1 file changed, 6 insertions(+) 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';