From 810b13d25ad9ce685bc6b11139d396589b0e0324 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sat, 20 Apr 2013 19:56:21 +0200 Subject: [PATCH] Fix automated notification closing in Google Chrome --- file/js/be.bastelstu.Chat.litcoffee | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/file/js/be.bastelstu.Chat.litcoffee b/file/js/be.bastelstu.Chat.litcoffee index 51f301d..42c4cfd 100644 --- a/file/js/be.bastelstu.Chat.litcoffee +++ b/file/js/be.bastelstu.Chat.litcoffee @@ -595,11 +595,14 @@ Sends out notifications for the given `message`. The number of unread messages w if window.Notification? if window.Notification.permission is 'granted' - notification = new window.Notification title, - body: content - onclick: -> + do -> + notification = new window.Notification title, + body: content + onclick: -> + notification.close() + setTimeout -> notification.close() - setTimeout notification.close, 5e3 + , 5e3 **refreshRoomList()** Updates the room list.