| Index: lib/notificationHelper.js |
| =================================================================== |
| --- a/lib/notificationHelper.js |
| +++ b/lib/notificationHelper.js |
| @@ -82,17 +82,17 @@ |
| { |
| buttons = [ |
| { |
| type: "open-all", |
| title: ext.i18n.getMessage("notification_open_all") |
| } |
| ]; |
| } |
| - if (["critical", "relentless"].indexOf(notificationType) == -1) |
| + if (!["critical", "relentless"].includes(notificationType)) |
| { |
| buttons.push({ |
| type: "configure", |
| title: ext.i18n.getMessage("notification_configure") |
| }); |
| } |
| } |
| @@ -265,17 +265,17 @@ |
| * |
| * @param {string} method Display method: icon, notification or popup |
| * @param {string} notificationType |
| * @return {boolean} |
| */ |
| exports.shouldDisplay = (method, notificationType) => |
| { |
| let methods = displayMethods[notificationType] || defaultDisplayMethods; |
| - return methods.indexOf(method) > -1; |
| + return methods.includes(method); |
| }; |
| ext.pages.onLoading.addListener(page => |
| { |
| NotificationStorage.showNext(stringifyURL(page.url)); |
| }); |
| NotificationStorage.addShowListener(showNotification); |