diff --git a/board/static/board/post.js b/board/static/board/post.js index f090462..8854f56 100644 --- a/board/static/board/post.js +++ b/board/static/board/post.js @@ -73,16 +73,19 @@ function openReportWindow(e, postElement) { function onLoad(e) { window.reportWindow = null; - window.menuItemFactories.push( - (postElement) => - $("") - .text("Report") - .attr("href", "#") - .on("click", (e) => { return openReportWindow(e, postElement); }) - ); } $(document).on("click", documentClick); $(document).on("click", ".post_id", doQuote); -$(window).on("load", onLoad); -window.menuItemFactories = []; \ No newline at end of file +$(window).on("load", () => { + window.reportWindow = null; +}); + +window.menuItemFactories = []; +window.menuItemFactories.push( + (postElement) => + $("") + .text("Report") + .attr("href", "#") + .on("click", (e) => { return openReportWindow(e, postElement); }) +); \ No newline at end of file