Use document.hasFocus() instead.
This commit is contained in:
parent
346010e188
commit
a088db9ee2
@ -96,7 +96,7 @@ Unread =
|
||||
Unread.openNotification post
|
||||
return
|
||||
openNotification: (post) ->
|
||||
return unless Header.areNotificationsEnabled
|
||||
return unless !document.hasFocus() and Header.areNotificationsEnabled
|
||||
name = if Conf['Anonymize']
|
||||
'Anonymous'
|
||||
else
|
||||
|
||||
@ -113,7 +113,7 @@ QR =
|
||||
QR.captcha.nodes.input.focus()
|
||||
notice = new Notice 'warning', el
|
||||
QR.notifications.push notice
|
||||
return unless Header.areNotificationsEnabled
|
||||
return unless !document.hasFocus and Header.areNotificationsEnabled
|
||||
notif = new Notification 'Quick reply warning',
|
||||
body: el.textContent
|
||||
icon: Favicon.logo
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user