mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-12-22 21:40:08 +00:00
Only ask for permissions if we don't already have them
This commit is contained in:
parent
fa07b26b44
commit
43f977e824
@ -192,8 +192,9 @@ window.console ?=
|
||||
# Desktop Notifications
|
||||
unless typeof window.webkitNotifications is 'undefined'
|
||||
$('#timsChatNotify').click (event) ->
|
||||
window.webkitNotifications.requestPermission() if $(@).data 'status'
|
||||
|
||||
if $(@).data 'status' and window.webkitNotifications.checkPermission() isnt 0
|
||||
window.webkitNotifications.requestPermission()
|
||||
|
||||
###
|
||||
# Changes the chat-room.
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user