2.0.5
This commit is contained in:
parent
d8331b7a2c
commit
e16f840e56
11 changed files with 187 additions and 82 deletions
|
@ -161,10 +161,15 @@ function hasNotificationPermission() {
|
|||
return !!(window.webkitNotifications) && (window.webkitNotifications.checkPermission() == 0);
|
||||
}
|
||||
var notifications = new Array();
|
||||
function showNotification(pic, title, text) {
|
||||
function showNotification(pic, title, text, type) {
|
||||
if (hasNotificationPermission()) {
|
||||
closeAllNotifications()
|
||||
var popup = window.webkitNotifications.createNotification(pic, title, text);
|
||||
//closeAllNotifications()
|
||||
var popup;
|
||||
if (type == 'text') {
|
||||
popup = window.webkitNotifications.createNotification(pic, title, text);
|
||||
} else if (type == 'html') {
|
||||
popup = window.webkitNotifications.createHTMLNotification(text);
|
||||
}
|
||||
notifications.push(popup);
|
||||
setTimeout(function (notWin) {
|
||||
notWin.cancel();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue