spot changes

This commit is contained in:
nick-delirium 2024-09-17 09:39:59 +02:00
parent 0029558c1f
commit 67eb4a6bca
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0

View file

@ -65,15 +65,14 @@ export default defineUnlistedScript(() => {
notification.innerHTML = notificationContent; notification.innerHTML = notificationContent;
document.body.appendChild(notification); document.body.appendChild(notification);
// Force reflow to ensure styles are applied notification.offsetHeight;
notification.offsetHeight; // Trigger reflow
setTimeout(() => { setTimeout(() => {
notification.style.opacity = "0"; notification.style.opacity = "0";
setTimeout(() => { setTimeout(() => {
document.body.removeChild(notification); document.body.removeChild(notification);
}, 300); }, 300);
}, 4000); }, 4500);
} }
function initNotificationListener() { function initNotificationListener() {