slightly increase posting cooldown
This commit is contained in:
parent
6a0c13b929
commit
829c34c220
@ -44,15 +44,16 @@ async function postMessage() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if(cd && posting_id!=undefined) {
|
if(cd && posting_id!=undefined) {
|
||||||
|
cd = false
|
||||||
|
setTimeout(function(){
|
||||||
|
cd = true
|
||||||
|
},400)
|
||||||
let r = await post("/api/post",{"message":document.getElementById("post-text").value,"reply_id":reply_id,"receiver":currentChannel,"pid": posting_id})
|
let r = await post("/api/post",{"message":document.getElementById("post-text").value,"reply_id":reply_id,"receiver":currentChannel,"pid": posting_id})
|
||||||
|
posting_id = undefined
|
||||||
update_pid()
|
update_pid()
|
||||||
if(window.location.href.split("?mention=")[1])location.replace('/posts');
|
if(window.location.href.split("?mention=")[1])location.replace('/posts');
|
||||||
document.getElementById("post-text").value=""
|
document.getElementById("post-text").value=""
|
||||||
unreply()
|
unreply()
|
||||||
cd = false
|
|
||||||
setTimeout(function(){
|
|
||||||
cd = true
|
|
||||||
},200)
|
|
||||||
} else {
|
} else {
|
||||||
alert("Please wait a tiny bit before posting again")
|
alert("Please wait a tiny bit before posting again")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user