fixed remote messages

This commit is contained in:
Luke Pulverenti 2013-08-28 01:17:26 -04:00
parent c1819ff31f
commit 9d71b16123
2 changed files with 5 additions and 1 deletions

View file

@ -122,6 +122,10 @@ var WebNotifications = {
}); });
} }
} }
},
supported: function() {
return window.Notification || window.webkitNotifications;
} }
}; };

View file

@ -840,7 +840,7 @@ var Dashboard = {
var cmd = msg.Data; var cmd = msg.Data;
if (cmd.TimeoutMs) { if (cmd.TimeoutMs && WebNotifications.supported()) {
var notification = { var notification = {
title: cmd.Header, title: cmd.Header,
body: cmd.Text, body: cmd.Text,