From 03b031ea793e91ce2f87cf28c73cefc8ce69a7b5 Mon Sep 17 00:00:00 2001 From: Lilian Teronen Date: Mon, 27 Nov 2023 01:37:03 +0200 Subject: More rework on routes. Best and worst matches. More visuals. --- static/alert-timeout.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'static/alert-timeout.js') 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) }) -- cgit v1.2.3