From e7c595bdca722858b022ac9ceb2736381f009149 Mon Sep 17 00:00:00 2001 From: polo Date: Sun, 7 Jun 2026 21:15:38 +0200 Subject: anti spam clic --- public/js/maintenance.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'public/js/maintenance.js') diff --git a/public/js/maintenance.js b/public/js/maintenance.js index 2ed7f98..0c28183 100644 --- a/public/js/maintenance.js +++ b/public/js/maintenance.js @@ -41,3 +41,18 @@ function cleanLogs(){ }); fetcher.send({}); } + +function preventClickSpam(button){ + if(button.disabled){ + return; + } + + button.disabled = true; + button.style.color = 'grey'; + toastNotify('Veuillez patienter...', 1000); + + setTimeout(() => { + button.disabled = false; + button.style.color = '#ff1d04'; + }, 1000); +} \ No newline at end of file -- cgit v1.2.3