summaryrefslogtreecommitdiff
path: root/static/alert-timeout.js
diff options
context:
space:
mode:
authorLilian Teronen <lteronen@local>2023-11-27 01:37:03 +0200
committerLilian Teronen <lteronen@local>2023-11-27 01:37:03 +0200
commit03b031ea793e91ce2f87cf28c73cefc8ce69a7b5 (patch)
tree882919559651e1b18904404ccc7c5106d167f1fd /static/alert-timeout.js
parentd2de3ae10b6f5314bd4b8243218212d2004f35b0 (diff)
More rework on routes. Best and worst matches. More visuals.
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)
})