diff options
author | Irma Lahtinen <ilahtine@local> | 2023-12-12 01:19:38 +0200 |
---|---|---|
committer | Irma Lahtinen <ilahtine@local> | 2023-12-12 01:19:38 +0200 |
commit | 3b8173e94b9228b0761e45174190b237b41d1db8 (patch) | |
tree | f94bc6edf214ae3557b1a5d3c22132e64098778e /static/alert-timeout.js | |
parent | 11ee6577a359862875936fd24b41d141b30ad0cf (diff) |
Adding "link to clipboard" functionality and forcing questions to consist printable characters.
Diffstat (limited to 'static/alert-timeout.js')
-rw-r--r-- | static/alert-timeout.js | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/static/alert-timeout.js b/static/alert-timeout.js index 6fe6def..e20106f 100644 --- a/static/alert-timeout.js +++ b/static/alert-timeout.js @@ -1,13 +1,8 @@ -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) - }) +setInterval( () => { + Array.from(document.getElementsByClassName('kysAlert')).forEach( (a)=>{ + a.addEventListener('click', (event) => { event.target.remove() } ) + if (a.style.transition=="opacity 2s") a.remove() + a.style.transition="opacity 2s" + a.style.opacity=0; + } ) +}, 5000) |