Browse Source

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

master
TFLCL 2 years ago
parent
commit
0ceb62b819
  1. 4
      js/main.js

4
js/main.js

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

Loading…
Cancel
Save