You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
649 B
JavaScript
24 lines
649 B
JavaScript
(function () {
|
|
const messageInput = document.getElementById('messageInputTag');
|
|
const submitButton = document.getElementById('submitButton');
|
|
|
|
messageInput.addEventListener('input', function () {
|
|
if (messageInput.value.trim() !== "") {
|
|
submitButton.classList.remove('hidden');
|
|
} else {
|
|
submitButton.classList.add('hidden');
|
|
}
|
|
});
|
|
|
|
|
|
|
|
document.getElementById("startNewConversation").addEventListener("click", function() {
|
|
const eventMessage = {
|
|
event_type: "start_conversation"
|
|
};
|
|
osichatSocket.send(JSON.stringify(eventMessage));
|
|
});
|
|
|
|
|
|
|
|
})(); |