do not ping api when document is hidden

This commit is contained in:
Kevin Froman 2020-03-24 00:21:13 -05:00
parent 2aa8cdbaa0
commit 83a1c09af7

View File

@ -38,6 +38,7 @@ return await fetch('/ping', {
} }
let pingCheck = async function(){ let pingCheck = async function(){
if (document.hidden){return}
result = await doPing() result = await doPing()
} }