X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fresources%2Fstatic%2Fjavascript%2Fsone.js;h=596c19ca15c3c500ce0eb8ae62d2dc924858cc85;hp=1341cc02d7e39ab32a9c75ad89ad53ecdb1024f4;hb=5777cb6291375cdd4cbc2c781d1fea807da566f8;hpb=d0ab70772ef0709c58cc493c0c7864cd35a906ea diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index 1341cc0..596c19c 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -218,7 +218,8 @@ function enhanceDeletePostButton(button, postId, text) { if (data.success) { $("#sone .post#" + postId).slideUp(); } else if (data.error == "invalid-post-id") { - alert("Invalid post ID given!"); + /* pretend the post is already gone. */ + getPost(postId).slideUp(); } else if (data.error == "auth-required") { alert("You need to be logged in."); } else if (data.error == "not-authorized") { @@ -249,7 +250,8 @@ function enhanceDeleteReplyButton(button, replyId, text) { if (data.success) { $("#sone .reply#" + replyId).slideUp(); } else if (data.error == "invalid-reply-id") { - alert("Invalid reply ID given!"); + /* pretend the reply is already gone. */ + getReply(replyId).slideUp(); } else if (data.error == "auth-required") { alert("You need to be logged in."); } else if (data.error == "not-authorized") {