This commit is contained in:
bkfox
2019-09-23 12:38:44 +02:00
parent cbfd1c1449
commit b3ec6f670f
29 changed files with 790 additions and 85 deletions

15
assets/public/utils.js Normal file
View File

@ -0,0 +1,15 @@
export function setEcoTimeout(func, ...args) {
return setTimeout((...args) => {
!document.hidden && func(...args)
}, ...args)
}
export function setEcoInterval(func, ...args) {
return setInterval((...args) => {
!document.hidden && func(...args)
}, ...args)
}