|
|
@ -118,8 +118,7 @@ function newmail_notifier_desktop(body)
|
|
|
|
|
|
|
|
|
|
|
|
function newmail_notifier_test_desktop()
|
|
|
|
function newmail_notifier_test_desktop()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var dn = window.webkitNotifications,
|
|
|
|
var txt = rcmail.gettext('testbody', 'newmail_notifier');
|
|
|
|
txt = rcmail.gettext('testbody', 'newmail_notifier');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// W3C draft implementation (with fix for Chrome/Chromium)
|
|
|
|
// W3C draft implementation (with fix for Chrome/Chromium)
|
|
|
|
try {
|
|
|
|
try {
|
|
|
@ -129,6 +128,7 @@ function newmail_notifier_test_desktop()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// webkit implementation
|
|
|
|
// webkit implementation
|
|
|
|
catch (e) {
|
|
|
|
catch (e) {
|
|
|
|
|
|
|
|
var dn = window.webkitNotifications;
|
|
|
|
if (dn) {
|
|
|
|
if (dn) {
|
|
|
|
if (!dn.checkPermission())
|
|
|
|
if (!dn.checkPermission())
|
|
|
|
newmail_notifier_desktop(txt);
|
|
|
|
newmail_notifier_desktop(txt);
|
|
|
@ -161,4 +161,4 @@ function newmail_notifier_desktop_authorize() {
|
|
|
|
if (perm == 'granted')
|
|
|
|
if (perm == 'granted')
|
|
|
|
newmail_notifier_test_desktop(); // Test again, which should show test message
|
|
|
|
newmail_notifier_test_desktop(); // Test again, which should show test message
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|