Index: background.js |
=================================================================== |
--- a/background.js |
+++ b/background.js |
@@ -299,7 +299,15 @@ |
if (activeNotification.severity === "critical" |
&& typeof webkitNotifications !== "undefined") |
{ |
- var notification = webkitNotifications.createHTMLNotification("notification.html"); |
+ if ("createHTMLNotification" in webkitNotifications) |
+ notification = webkitNotifications.createHTMLNotification("notification.html"); |
+ else if ("createNotification" in webkitNotifications) |
+ { |
+ var texts = Notification.getLocalizedTexts(notification); |
+ var title = texts.title ? texts.title : ""; |
+ var message = texts.message ? texts.message : ""; |
+ notification = webkitNotifications.createNotification("icons/abp-32.png", title, message); |
+ } |
notification.show(); |
notification.addEventListener("close", prepareNotificationIconAndPopup); |
} |