1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-23 23:20:57 +01:00

move are you sure prompt to the js file

This commit is contained in:
Lorenzo Yario 2024-06-27 02:18:06 -07:00 committed by GitHub
parent fe8fa0da8a
commit 1a780ce9cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -129,14 +129,16 @@ var banlist_init = function(token, my_boards, inMod) {
$(".banform").on("submit", function() { return false; });
$("#unban").on("click", function() {
$(".banform .hiddens").remove();
$("<input type='hidden' name='unban' value='unban' class='hiddens'>").appendTo(".banform");
$.each(selected, function(e) {
$("<input type='hidden' name='ban_"+e+"' value='unban' class='hiddens'>").appendTo(".banform");
});
$(".banform").off("submit").submit();
if (confirm('Are you sure you want to unban the selected IPs?')) {
$(".banform .hiddens").remove();
$("<input type='hidden' name='unban' value='unban' class='hiddens'>").appendTo(".banform");
$.each(selected, function(e) {
$("<input type='hidden' name='ban_"+e+"' value='unban' class='hiddens'>").appendTo(".banform");
});
$(".banform").off("submit").submit();
}
});
if (device_type == 'desktop') {