From 829c34c22092d89e36093701947a9f3c16cd487e Mon Sep 17 00:00:00 2001 From: Mystikfluu Date: Sat, 13 Aug 2022 21:40:13 +0200 Subject: [PATCH] slightly increase posting cooldown --- js/posts.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/js/posts.js b/js/posts.js index 1f8db7e..7d41edc 100644 --- a/js/posts.js +++ b/js/posts.js @@ -44,15 +44,16 @@ async function postMessage() { return } 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}) + posting_id = undefined update_pid() if(window.location.href.split("?mention=")[1])location.replace('/posts'); document.getElementById("post-text").value="" unreply() - cd = false - setTimeout(function(){ - cd = true - },200) } else { alert("Please wait a tiny bit before posting again") }