1
0
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:
Tim Düsterhus 2012-06-29 17:08:27 +02:00
parent fa07b26b44
commit 43f977e824

View File

@ -192,7 +192,8 @@ window.console ?=
# Desktop Notifications # Desktop Notifications
unless typeof window.webkitNotifications is 'undefined' unless typeof window.webkitNotifications is 'undefined'
$('#timsChatNotify').click (event) -> $('#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. # Changes the chat-room.