change function name in dms

"postMessage" -> "postMsg"
This commit is contained in:
Mystikfluu
2022-10-04 21:53:18 +02:00
parent 685f7de37c
commit 5e425c0fbc
2 changed files with 17 additions and 3 deletions
+12 -1
View File
@@ -57,7 +57,18 @@ function set_keys(s_key) {
main()
}
async function postMessage(elem) {
let last_called_postMsg = Date.now()
/*
previously called postMessage
*/
async function postMsg() {
if((Date.now() - last_called_postMsg) < 100) {
createModal("slow down there")
debugger;
return;
}
last_called_postMsg = Date.now()
let len = document.getElementById("post-text").value.length
if(len >= 1001) {
alert(`Your message cant contain more than 1000 characters! (${len})`)