| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * This file is part of Adblock Plus <https://adblockplus.org/>, | 2  * This file is part of Adblock Plus <https://adblockplus.org/>, | 
| 3  * Copyright (C) 2006-2016 Eyeo GmbH | 3  * Copyright (C) 2006-2016 Eyeo GmbH | 
| 4  * | 4  * | 
| 5  * Adblock Plus is free software: you can redistribute it and/or modify | 5  * Adblock Plus is free software: you can redistribute it and/or modify | 
| 6  * it under the terms of the GNU General Public License version 3 as | 6  * it under the terms of the GNU General Public License version 3 as | 
| 7  * published by the Free Software Foundation. | 7  * published by the Free Software Foundation. | 
| 8  * | 8  * | 
| 9  * Adblock Plus is distributed in the hope that it will be useful, | 9  * Adblock Plus is distributed in the hope that it will be useful, | 
| 10  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 204     } | 204     } | 
| 205     else if ("Notification" in window && activeNotification.type != "question") | 205     else if ("Notification" in window && activeNotification.type != "question") | 
| 206     { | 206     { | 
| 207       if (linkCount > 0) | 207       if (linkCount > 0) | 
| 208         message += " " + ext.i18n.getMessage("notification_without_buttons"); | 208         message += " " + ext.i18n.getMessage("notification_without_buttons"); | 
| 209 | 209 | 
| 210       let notification = new Notification( | 210       let notification = new Notification( | 
| 211         title, | 211         title, | 
| 212         { | 212         { | 
| 213           lang: Utils.appLocale, | 213           lang: Utils.appLocale, | 
| 214           dir: ext.i18n.getMessage("@@bidi_dir"), | 214           dir: Utils.readingDirection, | 
| 215           body: message, | 215           body: message, | 
| 216           icon: iconUrl | 216           icon: iconUrl | 
| 217         } | 217         } | 
| 218       ); | 218       ); | 
| 219 | 219 | 
| 220       notification.addEventListener("click", openNotificationLinks); | 220       notification.addEventListener("click", openNotificationLinks); | 
| 221       notification.addEventListener("close", notificationClosed); | 221       notification.addEventListener("close", notificationClosed); | 
| 222     } | 222     } | 
| 223     else | 223     else | 
| 224     { | 224     { | 
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 275  * @param {string} notificationType | 275  * @param {string} notificationType | 
| 276  * @return {boolean} | 276  * @return {boolean} | 
| 277  */ | 277  */ | 
| 278 exports.shouldDisplay = function(method, notificationType) | 278 exports.shouldDisplay = function(method, notificationType) | 
| 279 { | 279 { | 
| 280   let methods = displayMethods[notificationType] || defaultDisplayMethods; | 280   let methods = displayMethods[notificationType] || defaultDisplayMethods; | 
| 281   return methods.indexOf(method) > -1; | 281   return methods.indexOf(method) > -1; | 
| 282 }; | 282 }; | 
| 283 | 283 | 
| 284 NotificationStorage.addShowListener(showNotification); | 284 NotificationStorage.addShowListener(showNotification); | 
| OLD | NEW | 
|---|