This commit is contained in:
liyuchun
2022-04-22 09:01:32 +08:00
parent c37e1ef5b6
commit 7cc557e528
+2 -1
View File
@@ -16,11 +16,12 @@ needPing = false;
$(function()
{
var windowBlur = false;
if(window.Notification)
if(window.Notification && Notification.permission == 'granted')
{
window.onblur = function(){windowBlur = true;}
window.onfocus = function(){windowBlur = false;}
}
setInterval(function()
{
$.get(createLink('message', 'ajaxGetMessage', "windowBlur=" + (windowBlur ? '1' : '0')), function(data)