2022-10-23 16:24:17 +00:00
|
|
|
function removePost(t,post_id,button1,button2,cls) {
|
|
|
|
url="/remove_post/"+post_id
|
|
|
|
|
2022-10-30 15:10:07 +00:00
|
|
|
postToast(t,url,button1,button2,cls)
|
2022-10-23 16:24:17 +00:00
|
|
|
|
|
|
|
if (window.location.pathname == '/admin/reported/posts')
|
|
|
|
{
|
|
|
|
document.getElementById("flaggers-"+post_id).remove()
|
|
|
|
document.getElementById("post-"+post_id).remove()
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
document.getElementById("post-"+post_id).classList.add("banned");
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
function approvePost(t,post_id,button1,button2,cls) {
|
|
|
|
url="/approve_post/"+post_id
|
|
|
|
|
2022-10-30 15:10:07 +00:00
|
|
|
postToast(t,url,button1,button2,cls)
|
2022-10-23 16:24:17 +00:00
|
|
|
|
|
|
|
if (window.location.pathname == '/admin/reported/posts')
|
|
|
|
{
|
|
|
|
document.getElementById("flaggers-"+post_id).remove()
|
|
|
|
document.getElementById("post-"+post_id).remove()
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
document.getElementById("post-"+post_id).classList.remove("banned");
|
|
|
|
}
|
|
|
|
}
|