diff --git a/files/assets/js/comments_admin.js b/files/assets/js/comments_admin.js
index 2ece24db8..f76f96ed9 100644
--- a/files/assets/js/comments_admin.js
+++ b/files/assets/js/comments_admin.js
@@ -1,7 +1,17 @@
-function removeComment(post_id,button1,button2) {
+function removeCommentBackend(post_id) {
url="/ban_comment/"+post_id
post(url)
+}
+
+function approveCommentBackend(post_id) {
+ url="/unban_comment/"+post_id
+
+ post(url)
+}
+
+function removeCommentDesktop(post_id,button1,button2) {
+ removeCommentBackend(post_id)
try {
document.getElementById("comment-"+post_id+"-only").classList.add("banned");
@@ -10,7 +20,7 @@ function removeComment(post_id,button1,button2) {
}
var button=document.getElementById("remove-"+post_id);
- button.onclick=function(){approveComment(post_id)};
+ button.onclick=function(){approveCommentDesktop(post_id)};
button.innerHTML='Approve'
if (typeof button1 !== 'undefined') {
@@ -19,19 +29,17 @@ function removeComment(post_id,button1,button2) {
}
};
-function approveComment(post_id,button1,button2) {
- url="/unban_comment/"+post_id
-
- post(url)
+function approveCommentDesktop(post_id,button1,button2) {
+ approveCommentBackend(post_id)
try {
document.getElementById("comment-"+post_id+"-only").classList.remove("banned");
} catch(e) {
document.getElementById("context").classList.remove("banned");
}
-
+
var button=document.getElementById("remove-"+post_id);
- button.onclick=function(){removeComment(post_id)};
+ button.onclick=function(){removeCommentDesktop(post_id)};
button.innerHTML='Remove'
if (typeof button1 !== 'undefined') {
@@ -41,14 +49,12 @@ function approveComment(post_id,button1,button2) {
}
-function removeComment2(post_id,button1,button2) {
- url="/ban_comment/"+post_id
-
- post(url)
+function removeCommentMobile(post_id,button1,button2) {
+ removeCommentBackend(post_id)
document.getElementById("comment-"+post_id+"-only").classList.add("banned");
var button=document.getElementById("remove-"+post_id);
- button.onclick=function(){approveComment(post_id)};
+ button.onclick=function(){approveCommentMobile(post_id)};
button.innerHTML='Approve'
if (typeof button1 !== 'undefined') {
@@ -57,14 +63,12 @@ function removeComment2(post_id,button1,button2) {
}
};
-function approveComment2(post_id,button1,button2) {
- url="/unban_comment/"+post_id
-
- post(url)
+function approveCommentMobile(post_id,button1,button2) {
+ approveCommentBackend(post_id)
document.getElementById("comment-"+post_id+"-only").classList.remove("banned");
var button=document.getElementById("remove-"+post_id);
- button.onclick=function(){removeComment(post_id)};
+ button.onclick=function(){removeCommentMobile(post_id)};
button.innerHTML='Remove'
if (typeof button1 !== 'undefined') {
diff --git a/files/templates/component/comment/actions_desktop.html b/files/templates/component/comment/actions_desktop.html
index 75521f7a2..76cee0a8f 100644
--- a/files/templates/component/comment/actions_desktop.html
+++ b/files/templates/component/comment/actions_desktop.html
@@ -47,11 +47,11 @@
{% if v.admin_level >= 2 %}
{% if "/reported/" in request.path %}
-
-
+
+
{% else %}
-
-
+
+
{% endif %}
{% endif %}
diff --git a/files/templates/component/comment/actions_mobile_admin.html b/files/templates/component/comment/actions_mobile_admin.html
index 568bfc8d8..2a175ff47 100644
--- a/files/templates/component/comment/actions_mobile_admin.html
+++ b/files/templates/component/comment/actions_mobile_admin.html
@@ -28,11 +28,11 @@
{% endif %}
{% if "/reported/" in request.path %}
- Remove
- Approve
+ Remove
+ Approve
{% else %}
- Remove
- Approve
+ Remove
+ Approve
{% endif %}
{% if c.oauth_app %}