From 5d846e64c72722c45cbde542a26d0db8af6a3f04 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 23 Oct 2022 18:11:59 +0200 Subject: [PATCH] same as last commit --- files/assets/js/comments_admin.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/files/assets/js/comments_admin.js b/files/assets/js/comments_admin.js index e86612298..1841a3868 100644 --- a/files/assets/js/comments_admin.js +++ b/files/assets/js/comments_admin.js @@ -1,7 +1,7 @@ function removeComment(t,post_id,button1,button2,cls) { url="/remove_comment/"+post_id - post_toast(t,url) + post_toast(t,url,button1,button2,cls) if (window.location.pathname == '/admin/reported/comments') { @@ -15,15 +15,13 @@ function removeComment(t,post_id,button1,button2,cls) { } catch(e) { document.getElementById("context").classList.add("banned"); } - document.getElementById(button1).classList.toggle(cls); - document.getElementById(button2).classList.toggle(cls); } }; function approveComment(t,post_id,button1,button2,cls) { url="/approve_comment/"+post_id - post_toast(t,url) + post_toast(t,url,button1,button2,cls) if (window.location.pathname == '/admin/reported/comments') { @@ -37,8 +35,6 @@ function approveComment(t,post_id,button1,button2,cls) { } catch(e) { document.getElementById("context").classList.remove("banned"); } - document.getElementById(button1).classList.toggle(cls); - document.getElementById(button2).classList.toggle(cls); } }