From 3d480edaef645b91ee8d00733dccc59f7296df28 Mon Sep 17 00:00:00 2001 From: FChannel <=> Date: Thu, 28 Jan 2021 13:53:56 -0800 Subject: reporting requires captcha --- static/js/posts.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'static/js') diff --git a/static/js/posts.js b/static/js/posts.js index a6963de..805c1c1 100644 --- a/static/js/posts.js +++ b/static/js/posts.js @@ -149,6 +149,12 @@ function closeReply() document.getElementById("reply-comment").value = ""; } +function closeReport() +{ + document.getElementById("report-box").style.display = "none"; + document.getElementById("report-comment").value = ""; +} + function previous(actorName, page) { @@ -192,6 +198,24 @@ function quote(actorName, opid, id) dragElement(header); +} + +function report(actorName, id) +{ + var box = document.getElementById("report-box"); + var header = document.getElementById("report-header"); + var comment = document.getElementById("report-comment"); + var inReplyTo = document.getElementById("report-inReplyTo-box"); + + var w = window.innerWidth / 2 - 200; + var h = document.getElementById(id + "-content").offsetTop - 448; + + box.setAttribute("style", "display: block; position: absolute; width: 400px; height: 480px; z-index: 9; top: " + h + "px; left: " + w + "px; padding: 5px;"); + + header.innerText = "Report Post No. " + shortURL(actorName, id); + inReplyTo.value = id; + + dragElement(header); } function dragElement(elmnt) { -- cgit v1.2.3