check document.hidden

This commit is contained in:
creeper123123321 2021-03-06 22:24:39 -03:00
parent 69cab63ce6
commit c0509744cd

View File

@ -291,7 +291,7 @@ function confirmJoin(hash) {
socket.send(JSON.stringify({action: "session_hash_response", session_hash: hash}));
}
function authNotification(msg, yes, no) {
if (!pageBlur || Notification.permission != "granted") {
if ((!pageBlur && !document.hidden) || Notification.permission != "granted") {
if (confirm(msg)) yes(); else no();
return;
}