diff --git a/res/forum/home/home.html b/res/forum/home/home.html index 4c0c3f9..aa74e40 100644 --- a/res/forum/home/home.html +++ b/res/forum/home/home.html @@ -114,12 +114,18 @@ $(document).on("click", ".post_options", function(event) { - let post_title = $(this).parent(".post").children(".post_info").children("div").children(".post_author").html() + " - " + $(this).parent(".post").children(".post_info").children("div").children(".post_name").html(); + let post_author = $(this).parent(".post").children(".post_info").children("div").children(".post_author").html(); + let post_title = post_author + " - " + $(this).parent(".post").children(".post_info").children("div").children(".post_name").html(); if ($("#moderation_post_title").html() !== post_title) { $("#moderation_popup").css("display", "flex"); $("#moderation_post_title").html(post_title); + + let post_id_buffer = $(this).parent(".post").children(".post_image").children("img").attr("src").split("/"); + let post_id = post_id_buffer[post_id_buffer.length - 1]; + + $("#archive_btn").attr("onclick", "archive_post(\"" + post_id + "\", \"" + post_author + "\")"); } else { $("#moderation_popup").css("display", "none");