Make toast notifications duration setable in function

This commit is contained in:
2026-02-09 00:45:44 +01:00
parent ecce4ca6b4
commit a92b4ef42c

View File

@@ -15,7 +15,7 @@ function showLoading(show) {
}
// Show toast notification
function showToast(message, type) {
function showToast(message, type, duration) {
var container = document.getElementById('toast-container');
if (!container || !message) return;
@@ -38,7 +38,7 @@ function showToast(message, type) {
setTimeout(function() {
toast.remove();
}, 300);
}, 5000);
}, duration || 5000);
}
// Show toast for ban event