From 1a780ce9cb3cf788def1c444423aaf39ffe2bb10 Mon Sep 17 00:00:00 2001 From: Lorenzo Yario Date: Thu, 27 Jun 2024 02:18:06 -0700 Subject: [PATCH] move are you sure prompt to the js file --- js/mod/ban-list.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/js/mod/ban-list.js b/js/mod/ban-list.js index d50fb5d2..415934b1 100644 --- a/js/mod/ban-list.js +++ b/js/mod/ban-list.js @@ -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(); - $("").appendTo(".banform"); - - $.each(selected, function(e) { - $("").appendTo(".banform"); - }); - - $(".banform").off("submit").submit(); + if (confirm('Are you sure you want to unban the selected IPs?')) { + $(".banform .hiddens").remove(); + $("").appendTo(".banform"); + + $.each(selected, function(e) { + $("").appendTo(".banform"); + }); + + $(".banform").off("submit").submit(); + } }); if (device_type == 'desktop') {