diff --git a/files/assets/js/followers.js b/files/assets/js/followers.js index 6f7c650bd..1cd91efe6 100644 --- a/files/assets/js/followers.js +++ b/files/assets/js/followers.js @@ -1,5 +1,5 @@ -function removeFollower(event, username) { - post_toast(event.target,'/remove_follow/' + username); +function removeFollower(t, username) { + post_toast(t,'/remove_follow/' + username); let table = document.getElementById("followers-table"); - table.removeChild(event.target.parentElement.parentElement); -} \ No newline at end of file + table.removeChild(t.parentElement.parentElement); +} diff --git a/files/assets/js/following.js b/files/assets/js/following.js index 535359c18..2ecd50891 100644 --- a/files/assets/js/following.js +++ b/files/assets/js/following.js @@ -1,5 +1,5 @@ -function removeFollowing(event, username) { - post_toast(event.target,'/unfollow/' + username); +function removeFollowing(t, username) { + post_toast(t,'/unfollow/' + username); let table = document.getElementById("followers-table"); - table.removeChild(event.target.parentElement.parentElement); -} \ No newline at end of file + table.removeChild(t.parentElement.parentElement); +} diff --git a/files/templates/followers.html b/files/templates/followers.html index c41b147dd..10979a379 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 %} diff --git a/files/templates/following.html b/files/templates/following.html index 6b5947345..d4ac9b3db 100644 --- a/files/templates/following.html +++ b/files/templates/following.html @@ -22,7 +22,7 @@ {{loop.index}} {% include "user_in_table.html" %} {% if v.id == u.id %} -
Unfollow
+
Unfollow
{% endif %} {% endfor %} @@ -31,4 +31,4 @@ -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/files/templates/home.html b/files/templates/home.html index c5e3e8d5b..0642dccb2 100644 --- a/files/templates/home.html +++ b/files/templates/home.html @@ -213,7 +213,7 @@ document.addEventListener('DOMContentLoaded', function() { const tt = bootstrap.Tooltip.getOrCreateInstance(document.getElementById('mobile-prompt')) tt.show() - document.getElementsByClassName('tooltip')[0].onclick = function(event){ + document.getElementsByClassName('tooltip')[0].onclick = function() { tt.hide() var xhr = new XMLHttpRequest(); xhr.withCredentials=true;