Update static/index.html
Browse files- static/index.html +8 -1
static/index.html
CHANGED
|
@@ -318,9 +318,10 @@
|
|
| 318 |
const textarea = document.querySelector("textarea"),
|
| 319 |
chatContainer = document.querySelector(".chat-container"),
|
| 320 |
sendChatBtn = document.querySelector("span.material-symbols-rounded"),
|
|
|
|
| 321 |
toggleIcon = document.querySelector(".typing-controls span"),
|
| 322 |
defaultText = document.querySelector(".default-text");
|
| 323 |
-
|
| 324 |
let userMessage = null;
|
| 325 |
|
| 326 |
toggleIcon.onclick = () => {
|
|
@@ -493,6 +494,12 @@ const copyMessage = (element) => {
|
|
| 493 |
});
|
| 494 |
|
| 495 |
sendChatBtn.addEventListener("click", handleChat);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 496 |
</script>
|
| 497 |
</body>
|
| 498 |
</html>
|
|
|
|
| 318 |
const textarea = document.querySelector("textarea"),
|
| 319 |
chatContainer = document.querySelector(".chat-container"),
|
| 320 |
sendChatBtn = document.querySelector("span.material-symbols-rounded"),
|
| 321 |
+
deleteBtn = document.getElementById("delete-btn"),
|
| 322 |
toggleIcon = document.querySelector(".typing-controls span"),
|
| 323 |
defaultText = document.querySelector(".default-text");
|
| 324 |
+
|
| 325 |
let userMessage = null;
|
| 326 |
|
| 327 |
toggleIcon.onclick = () => {
|
|
|
|
| 494 |
});
|
| 495 |
|
| 496 |
sendChatBtn.addEventListener("click", handleChat);
|
| 497 |
+
// Add event listener for delete button to clear chat
|
| 498 |
+
deleteBtn.addEventListener("click", () => {
|
| 499 |
+
chatContainer.innerHTML = "";
|
| 500 |
+
defaultText.style.display = "block";
|
| 501 |
+
});
|
| 502 |
+
});
|
| 503 |
</script>
|
| 504 |
</body>
|
| 505 |
</html>
|