summaryrefslogtreecommitdiff
path: root/src/js
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2024-01-10 11:30:55 +0800
committerlittleblack111 <littleblack11111@gmail.com>2024-01-10 11:30:55 +0800
commit409a97f13b17c6a9423a958a2e7c4dd0fd029671 (patch)
tree2c7ec78ad4aec7d48519dc2eb2a3ec3aad7ab258 /src/js
parentcfc3399c2e2006e16db3845559810f289b2071f5 (diff)
blob: cleared prevouise timeout so that it don't keep bugging reset if user keep click
Diffstat (limited to 'src/js')
-rw-r--r--src/js/randomblob.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/js/randomblob.js b/src/js/randomblob.js
index 903ec80a..3e068255 100644
--- a/src/js/randomblob.js
+++ b/src/js/randomblob.js
@@ -59,10 +59,11 @@ function main() {
resetBlob()
isFirstTime = false;
}
- setTimeout(main, getRandomInt(7500, 30000));
+ let mainInterval = setTimeout(main, getRandomInt(7500, 30000));
}
blob.addEventListener('click', function() {
+ clearTimeout(mainInterval)
main(getRandomInt(7500, 30000));
});