aboutsummaryrefslogtreecommitdiff
path: root/static/js
diff options
context:
space:
mode:
authorFChannel <=>2021-01-28 13:53:56 -0800
committerFChannel <=>2021-01-28 13:53:56 -0800
commit3d480edaef645b91ee8d00733dccc59f7296df28 (patch)
tree162be87968f72ec5ae5431ed85f1f33b23b3be99 /static/js
parentee3c47a5b2251380ded1239b149fd1f6e6514bfb (diff)
reporting requires captcha
Diffstat (limited to 'static/js')
-rw-r--r--static/js/posts.js24
1 files changed, 24 insertions, 0 deletions
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) {