Rimas Kudelis
2013-07-12 28d3ba505d6a2722dfb55c8fc697ec81a4f423d6
Don't set the dn variable unless it's needed.
1 files modified
6 ■■■■ changed files
plugins/newmail_notifier/newmail_notifier.js 6 ●●●● patch | view | raw | blame | history
plugins/newmail_notifier/newmail_notifier.js
@@ -118,8 +118,7 @@
function newmail_notifier_test_desktop()
{
    var dn = window.webkitNotifications,
        txt = rcmail.gettext('testbody', 'newmail_notifier');
    var txt = rcmail.gettext('testbody', 'newmail_notifier');
    // W3C draft implementation (with fix for Chrome/Chromium)
    try {
@@ -129,6 +128,7 @@
    }
    // webkit implementation
    catch (e) {
        var dn = window.webkitNotifications;
        if (dn) {
            if (!dn.checkPermission())
                newmail_notifier_desktop(txt);
@@ -161,4 +161,4 @@
                if (perm == 'granted')
                        newmail_notifier_test_desktop();  // Test again, which should show test message
        });
}
}