upgrade vue and assets

This commit is contained in:
bkfox
2022-03-18 02:53:54 +01:00
parent 5b788ca28f
commit adb10c3d95
76 changed files with 2453 additions and 11975 deletions

18
assets/src/utils.js Normal file
View File

@ -0,0 +1,18 @@
/**
* Run function with provided args only if document is not hidden
*/
export function setEcoTimeout(func, ...args) {
return setTimeout((...args) => {
!document.hidden && func(...args)
}, ...args)
}
/**
* Run function at specific interval only if document is not hidden
*/
export function setEcoInterval(func, ...args) {
return setInterval((...args) => {
!document.hidden && func(...args)
}, ...args)
}