Index: lib/notificationHelper.js |
diff --git a/lib/notificationHelper.js b/lib/notificationHelper.js |
index 6341e81ad8ec88e7ed5e378313dfa4a73a698929..e5c23def4a6e6054d751822a501bd0dd410dd4b5 100644 |
--- a/lib/notificationHelper.js |
+++ b/lib/notificationHelper.js |
@@ -39,7 +39,7 @@ let canUseChromeNotifications = platform == "chromium" && "notifications" in chr |
function prepareNotificationIconAndPopup() |
{ |
let animateIcon = shouldDisplay("icon", activeNotification.type); |
- activeNotification.onClicked = function() |
+ activeNotification.onClicked = () => |
{ |
if (animateIcon) |
stopIconAnimation(); |
@@ -123,7 +123,7 @@ function notificationButtonClick(buttonIndex) |
break; |
case "configure": |
Prefs.notifications_showui = true; |
- ext.showOptions(function(page) |
+ ext.showOptions(page => |
{ |
page.sendMessage({ |
type: "app.respond", |
@@ -153,14 +153,14 @@ function initChromeNotifications() |
if (activeNotification && activeNotification.type != "question" && !("links" in activeNotification)) |
return; |
- chrome.notifications.clear(notificationId, function(wasCleared) |
+ chrome.notifications.clear(notificationId, wasCleared => |
{ |
if (wasCleared) |
notificationClosed(); |
}); |
} |
- chrome.notifications.onButtonClicked.addListener(function(notificationId, buttonIndex) |
+ chrome.notifications.onButtonClicked.addListener((notificationId, buttonIndex) => |
{ |
notificationButtonClick(buttonIndex); |
clearActiveNotification(notificationId); |
@@ -232,7 +232,7 @@ function showNotification(notification) |
/** |
* Initializes the notification system. |
*/ |
-exports.initNotifications = function() |
+exports.initNotifications = () => |
{ |
if (canUseChromeNotifications) |
initChromeNotifications(); |
@@ -244,10 +244,7 @@ exports.initNotifications = function() |
* |
* @return {?object} |
*/ |
-exports.getActiveNotification = function() |
-{ |
- return activeNotification; |
-}; |
+exports.getActiveNotification = () => activeNotification; |
let shouldDisplay = |
/** |
@@ -258,7 +255,7 @@ let shouldDisplay = |
* @param {string} notificationType |
* @return {boolean} |
*/ |
-exports.shouldDisplay = function(method, notificationType) |
+exports.shouldDisplay = (method, notificationType) => |
{ |
let methods = displayMethods[notificationType] || defaultDisplayMethods; |
return methods.indexOf(method) > -1; |