easier file management

This commit is contained in:
GhzGarage
2021-04-08 19:11:32 -05:00
parent a89baa5619
commit 36a139cc09
19 changed files with 0 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
window.addEventListener('message', function (event) {
switch(event.data.action) {
case 'show':
ShowNotif(event.data);
break;
default:
ShowNotif(event.data);
break;
}
});
function ShowNotif(data) {
var $notification = $('.notification.template').clone();
$notification.removeClass('template');
$notification.addClass(data.type);
$notification.html(data.text);
$notification.fadeIn();
$('.notif-container').prepend($notification);
setTimeout(function() {
$.when($notification.fadeOut(1500)).done(function() {
$notification.remove()
});
}, data.length != null ? data.length : 2500);
}