don't fetch stats on home page if there is no window focus
This commit is contained in:
		
							parent
							
								
									42a8d71ebf
								
							
						
					
					
						commit
						c7b8f9bed6
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		|  | @ -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…
	
	Add table
		Add a link
		
	
		Reference in a new issue