2023-06-24 17:36:27 +00:00
|
|
|
function block_user(t) {
|
2023-05-05 02:16:19 +00:00
|
|
|
const usernameField = document.getElementById("block-username");
|
|
|
|
const isValidUsername = usernameField.checkValidity();
|
|
|
|
username = usernameField.value;
|
|
|
|
if (isValidUsername) {
|
2023-06-24 17:36:27 +00:00
|
|
|
postToastReload(t,`/settings/block?username=${username}`);
|
2023-05-05 02:16:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function unblock_user(t, url) {
|
|
|
|
postToast(t, url,
|
|
|
|
{
|
|
|
|
},
|
|
|
|
() => {
|
|
|
|
t.parentElement.parentElement.remove();
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|