summaryrefslogtreecommitdiff
path: root/static/kys-link-info.js
diff options
context:
space:
mode:
authorAira Kyytsönen <akyytson@local>2023-12-12 01:59:51 +0200
committerAira Kyytsönen <akyytson@local>2023-12-12 01:59:51 +0200
commit84d1277c408038ab0df6179659c68ac7f08a098f (patch)
tree8a6f374e9810198a8559d8a236f8179c909c1fe7 /static/kys-link-info.js
parent3dc9e71b7c733e7fe6fe9e226ad363f84a2e1dee (diff)
Changing database variable D to db. Making error and infomessages dissapear.
Diffstat (limited to 'static/kys-link-info.js')
-rw-r--r--static/kys-link-info.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/static/kys-link-info.js b/static/kys-link-info.js
index f3165b2..18a0a23 100644
--- a/static/kys-link-info.js
+++ b/static/kys-link-info.js
@@ -13,8 +13,12 @@ kysLink.onclick = () => {
setInterval( () => {
Array.from(document.getElementsByClassName('kysInfo')).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;
+ if ( a.state == undefined ) a.state = 0
+ if (a.state == 4) {
+ a.style.transition = "opacity 1s"
+ a.style.opacity = 0
+ }
+ if (a.state == 5) a.remove()
+ a.state += 1
} )
-}, 5000)
+}, 1000)