don't fetch stats on home page if there is no window focus
parent
42a8d71ebf
commit
c7b8f9bed6
|
@ -82,6 +82,10 @@ fetch('/config/get/general.security_level', {
|
|||
})
|
||||
|
||||
var getStats = function(){
|
||||
if (document.hidden()){
|
||||
console.debug('skipping stats since no window focus')
|
||||
return
|
||||
}
|
||||
fetch('/getstats', {
|
||||
headers: {
|
||||
"token": webpass
|
||||
|
|
Loading…
Reference in New Issue