summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorRimas Kudelis <rimas@datalogistiikka.fi>2013-07-12 22:22:08 +0300
committerRimas Kudelis <rimas@datalogistiikka.fi>2013-07-12 22:22:08 +0300
commit28d3ba505d6a2722dfb55c8fc697ec81a4f423d6 (patch)
tree44eb85832c852d3b0283698ec588d958fc9424f2 /plugins
parent2b81b0bf11e03ab8828fa2e10f8aab1986684799 (diff)
Don't set the dn variable unless it's needed.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/newmail_notifier/newmail_notifier.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/newmail_notifier/newmail_notifier.js b/plugins/newmail_notifier/newmail_notifier.js
index 320382a74..b2d7cf497 100644
--- a/plugins/newmail_notifier/newmail_notifier.js
+++ b/plugins/newmail_notifier/newmail_notifier.js
@@ -118,8 +118,7 @@ function newmail_notifier_desktop(body)
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 @@ function newmail_notifier_test_desktop()
}
// webkit implementation
catch (e) {
+ var dn = window.webkitNotifications;
if (dn) {
if (!dn.checkPermission())
newmail_notifier_desktop(txt);
@@ -161,4 +161,4 @@ function newmail_notifier_desktop_authorize() {
if (perm == 'granted')
newmail_notifier_test_desktop(); // Test again, which should show test message
});
-} \ No newline at end of file
+}