diff --git a/app/static/script.js b/app/static/script.js new file mode 100644 index 0000000..7a4868e --- /dev/null +++ b/app/static/script.js @@ -0,0 +1,21 @@ +function sendMessage() { + let id = window.location.href.split("/").slice(-1)[0] + message = document.getElementById("chatbox-input-box").value + document.getElementById("chatbox-input-box").value = '' + document.getElementById("chatbox").innerHTML += `
`; + var xhttp = new XMLHttpRequest(); + xhttp.onreadystatechange = function() { + if (this.readyState == 4) { + if (this.status == 200) { + message = this.responseText.replace("\n", "