Spaces:
Sleeping
Sleeping
Update static/script.js
Browse files- static/script.js +8 -0
static/script.js
CHANGED
|
@@ -15,3 +15,11 @@ function sendMessage() {
|
|
| 15 |
document.getElementById('chatbot').scrollTop = document.getElementById('chatbot').scrollHeight;
|
| 16 |
}
|
| 17 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
document.getElementById('chatbot').scrollTop = document.getElementById('chatbot').scrollHeight;
|
| 16 |
}
|
| 17 |
}
|
| 18 |
+
|
| 19 |
+
function createButton(content, className, onClickHandler) {
|
| 20 |
+
const button = document.createElement('button');
|
| 21 |
+
button.classList.add('selection-btn', className);
|
| 22 |
+
button.innerText = content;
|
| 23 |
+
button.onclick = onClickHandler;
|
| 24 |
+
return button;
|
| 25 |
+
}
|