forked from MarseyWorld/MarseyWorld
better js for follower pages
parent
981256eb00
commit
25c5c8fb7d
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<td>{% include "user_in_table.html" %}</td>
|
||||
<td {% if follow.created_utc > 1599343262 %}data-time="{{follow.created_utc}}"{% endif %}></td>
|
||||
{% if v.id == u.id %}
|
||||
<td><div class="btn btn-danger pr-2" onclick="removeFollower(this, '{{user.username}}')">Remove follow</div></td>
|
||||
<td><div class="btn btn-danger" onclick="removeFollower(this, '{{user.username}}')">Remove follow</div></td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in New Issue