Remove workaround for SeaMonkey < 2.35 Notification crash. #904
This commit is contained in:
parent
f2f6f1be6c
commit
386ebfbbb7
@ -131,19 +131,17 @@ Unread =
|
|||||||
|
|
||||||
openNotification: (post) ->
|
openNotification: (post) ->
|
||||||
return unless Header.areNotificationsEnabled
|
return unless Header.areNotificationsEnabled
|
||||||
# XXX https://bugzilla.mozilla.org/show_bug.cgi?id=1130502 (SeaMonkey)
|
notif = new Notification "#{post.info.nameBlock} replied to you",
|
||||||
try
|
body: post.info.commentDisplay
|
||||||
notif = new Notification "#{post.info.nameBlock} replied to you",
|
icon: Favicon.logo
|
||||||
body: post.info.commentDisplay
|
notif.onclick = ->
|
||||||
icon: Favicon.logo
|
Header.scrollToIfNeeded post.nodes.root, true
|
||||||
notif.onclick = ->
|
# XXX https://github.com/derjanb/tampermonkey/issues/253
|
||||||
Header.scrollToIfNeeded post.nodes.root, true
|
$.global -> window.focus()
|
||||||
# XXX https://github.com/derjanb/tampermonkey/issues/253
|
notif.onshow = ->
|
||||||
$.global -> window.focus()
|
setTimeout ->
|
||||||
notif.onshow = ->
|
notif.close()
|
||||||
setTimeout ->
|
, 7 * $.SECOND
|
||||||
notif.close()
|
|
||||||
, 7 * $.SECOND
|
|
||||||
|
|
||||||
onUpdate: (e) ->
|
onUpdate: (e) ->
|
||||||
if !e.detail[404]
|
if !e.detail[404]
|
||||||
|
|||||||
@ -206,22 +206,20 @@ QR =
|
|||||||
unless Header.areNotificationsEnabled
|
unless Header.areNotificationsEnabled
|
||||||
alert el.textContent if d.hidden and not QR.cooldown.auto
|
alert el.textContent if d.hidden and not QR.cooldown.auto
|
||||||
else if d.hidden or not (focusOverride or d.hasFocus())
|
else if d.hidden or not (focusOverride or d.hasFocus())
|
||||||
# XXX https://bugzilla.mozilla.org/show_bug.cgi?id=1130502 (SeaMonkey)
|
notif = new Notification el.textContent,
|
||||||
try
|
body: el.textContent
|
||||||
notif = new Notification el.textContent,
|
icon: Favicon.logo
|
||||||
body: el.textContent
|
# XXX https://github.com/derjanb/tampermonkey/issues/253
|
||||||
icon: Favicon.logo
|
notif.onclick = -> $.global -> window.focus()
|
||||||
# XXX https://github.com/derjanb/tampermonkey/issues/253
|
if $.engine isnt 'gecko'
|
||||||
notif.onclick = -> $.global -> window.focus()
|
# Firefox automatically closes notifications
|
||||||
if $.engine isnt 'gecko'
|
# so we can't control the onclose properly.
|
||||||
# Firefox automatically closes notifications
|
notif.onclose = -> notice.close()
|
||||||
# so we can't control the onclose properly.
|
notif.onshow = ->
|
||||||
notif.onclose = -> notice.close()
|
setTimeout ->
|
||||||
notif.onshow = ->
|
notif.onclose = null
|
||||||
setTimeout ->
|
notif.close()
|
||||||
notif.onclose = null
|
, 7 * $.SECOND
|
||||||
notif.close()
|
|
||||||
, 7 * $.SECOND
|
|
||||||
|
|
||||||
notifications: []
|
notifications: []
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user