don't fetch stats on home page if there is no window focus
This commit is contained in:
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
Block a user