diff --git a/files/assets/js/followers.js b/files/assets/js/followers.js index 1cd91efe6..d237e5905 100644 --- a/files/assets/js/followers.js +++ b/files/assets/js/followers.js @@ -1,5 +1,4 @@ function removeFollower(t, username) { post_toast(t,'/remove_follow/' + username); - let table = document.getElementById("followers-table"); - table.removeChild(t.parentElement.parentElement); + t.parentElement.parentElement.remove(); } diff --git a/files/assets/js/following.js b/files/assets/js/following.js index 2ecd50891..ba846496c 100644 --- a/files/assets/js/following.js +++ b/files/assets/js/following.js @@ -1,5 +1,4 @@ function removeFollowing(t, username) { post_toast(t,'/unfollow/' + username); - let table = document.getElementById("followers-table"); - table.removeChild(t.parentElement.parentElement); + t.parentElement.parentElement.remove(); } diff --git a/files/templates/followers.html b/files/templates/followers.html index 10979a379..e0cd25583 100644 --- a/files/templates/followers.html +++ b/files/templates/followers.html @@ -24,7 +24,7 @@ {% include "user_in_table.html" %} 1599343262 %}data-time="{{follow.created_utc}}"{% endif %}> {% if v.id == u.id %} -
Remove follow
+
Remove follow
{% endif %} {% endfor %}