mirror of
https://github.com/SubleXBle/Fail2Ban-Report.git
synced 2026-05-07 15:39:08 -05:00
c42852b401
new
19 lines
478 B
JavaScript
19 lines
478 B
JavaScript
// assets/js/notifications.js
|
|
|
|
function showNotification(message, type = "info", duration = 5000) {
|
|
const container = document.getElementById('notification-container');
|
|
if (!container) return;
|
|
|
|
const note = document.createElement('div');
|
|
note.className = 'notification ' + type;
|
|
|
|
note.innerText = message;
|
|
container.appendChild(note);
|
|
|
|
// console.log(`Notification shown: "${message}" for ${duration}ms`);
|
|
|
|
setTimeout(() => {
|
|
note.remove();
|
|
}, duration);
|
|
}
|