summaryrefslogtreecommitdiff
path: root/static/alert-timeout.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/alert-timeout.js')
-rw-r--r--static/alert-timeout.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/static/alert-timeout.js b/static/alert-timeout.js
index 01bd260..6fe6def 100644
--- a/static/alert-timeout.js
+++ b/static/alert-timeout.js
@@ -2,4 +2,12 @@ Array.from(document.getElementsByClassName('kysAlert')).forEach( (a) => {
a.addEventListener('click', (event) => {
event.target.remove();
})
+ setTimeout( () => {
+ Array.from(document.getElementsByClassName('kysAlert'))
+ .forEach( (a) => {
+ if (a.style.transition=="opacity 2s") a.remove()
+ a.style.transition="opacity 2s"
+ a.style.opacity=0;
+ } )
+ }, 5000)
})