1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-10-31 14:10:08 +00:00

Fix desktop notifications

This commit is contained in:
Tim Düsterhus 2013-01-29 21:33:30 +01:00
parent 8d26f5dc11
commit 98f5e1bee3

View File

@ -486,7 +486,7 @@ window.console ?=
if typeof window.webkitNotifications isnt 'undefined'
if window.webkitNotifications.checkPermission() is 0
title = WCF.Language.get 'chat.general.notify.title'
icon = WCF.Icon.get 'be.bastelstu.chat.chat'
icon = "data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw%3D%3D" # empty gif
content = message.username + message.separator + (if message.separator is ' ' then '' else ' ') + message.message
notification = window.webkitNotifications.createNotification icon, title, content
notification.show()