Fixed an issue where setTimeout('functionName()', time) would be blocked by CSP

This commit is contained in:
2022-07-07 21:04:34 +02:00
parent 7773309a40
commit 0ceb62b819

View File

@@ -307,7 +307,9 @@ function newShootingStar() {
// let nextIn = 10;
let nextIn = 7000 + Math.floor(Math.random() * 5000);
if (areStarsShooting) {
setTimeout('newShootingStar()', nextIn);
setTimeout(() => {
newShootingStar();
}, nextIn);
}
}, duration);
// setTimeout('newShootingStar()', duration + nextIn);