diff --git a/files/templates/comments.html b/files/templates/comments.html
index c5af4078c..261edb741 100644
--- a/files/templates/comments.html
+++ b/files/templates/comments.html
@@ -438,7 +438,7 @@
{% endif %}
-
Copy link
+ Copy link
Context
@@ -453,17 +453,23 @@
{% endif %}
{% if v and c.post and (v.admin_level >= 1 or v.id == c.post.author_id) and c.level == 1 %}
- Pin
- Unpin
+ Pin
+ Unpin
{% endif %}
{% if v %}
{% if v.admin_level>=1 and v.id==c.author_id %}
- {{'Undistinguish' if c.distinguish_level else 'Distinguish'}}
+ Distinguish
+ Undistinguish
{% endif %}
{% if v.admin_level>=3 %}
- Approve
- Remove
+ {% if "/flagged/" in request.path %}
+ Approve
+ Remove
+ {% else %}
+ Approve
+ Remove
+ {% endif %}
{% endif %}
{% if v.admin_level >=4 and c.oauth_app %}
API App
diff --git a/files/templates/default.html b/files/templates/default.html
index 0848835ec..5badc09b2 100644
--- a/files/templates/default.html
+++ b/files/templates/default.html
@@ -168,6 +168,46 @@
}
}
+
+ function removeComment2(post_id,button1,button2) {
+ url="/ban_comment/"+post_id
+
+ callback=function(){
+ document.getElementById("comment-"+post_id+"-only").classList.add("banned");
+
+ button=document.getElementById("moderate-"+post_id);
+ button.onclick=function(){approveComment(post_id)};
+ button.innerHTML='Approve'
+ }
+ post(url, callback, "Comment has been removed.")
+
+
+ if (typeof button1 !== 'undefined') {
+ document.getElementById(button1).classList.toggle("d-none");
+ document.getElementById(button2).classList.toggle("d-none");
+ }
+ };
+
+ function approveComment2(post_id,button1,button2) {
+ url="/unban_comment/"+post_id
+
+ callback=function(){
+ document.getElementById("comment-"+post_id+"-only").classList.remove("banned");
+
+ button=document.getElementById("moderate-"+post_id);
+ button.onclick=function(){removeComment(post_id)};
+ button.innerHTML='Remove'
+ }
+
+ post(url, callback, "Comment has been approved.")
+
+ if (typeof button1 !== 'undefined') {
+ document.getElementById(button1).classList.toggle("d-none");
+ document.getElementById(button2).classList.toggle("d-none");
+ }
+ }
+
+
admin_comment=function(cid,button1,button2,distinguish){