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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 } | 205 } |
206 else if ("Notification" in window && activeNotification.type != "question") | 206 else if ("Notification" in window && activeNotification.type != "question") |
207 { | 207 { |
208 if (linkCount > 0) | 208 if (linkCount > 0) |
209 message += " " + ext.i18n.getMessage("notification_without_buttons"); | 209 message += " " + ext.i18n.getMessage("notification_without_buttons"); |
210 | 210 |
211 let notification = new Notification( | 211 let notification = new Notification( |
212 title, | 212 title, |
213 { | 213 { |
214 lang: Utils.appLocale, | 214 lang: Utils.appLocale, |
215 dir: ext.i18n.getMessage("@@bidi_dir"), | 215 dir: Utils.readingDirection, |
216 body: message, | 216 body: message, |
217 icon: iconUrl | 217 icon: iconUrl |
218 } | 218 } |
219 ); | 219 ); |
220 | 220 |
221 notification.addEventListener("click", openNotificationLinks); | 221 notification.addEventListener("click", openNotificationLinks); |
222 notification.addEventListener("close", notificationClosed); | 222 notification.addEventListener("close", notificationClosed); |
223 } | 223 } |
224 else | 224 else |
225 { | 225 { |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 let methods = displayMethods[notificationType] || defaultDisplayMethods; | 271 let methods = displayMethods[notificationType] || defaultDisplayMethods; |
272 return methods.indexOf(method) > -1; | 272 return methods.indexOf(method) > -1; |
273 }; | 273 }; |
274 | 274 |
275 ext.pages.onLoading.addListener(page => | 275 ext.pages.onLoading.addListener(page => |
276 { | 276 { |
277 NotificationStorage.showNext(stringifyURL(page.url)); | 277 NotificationStorage.showNext(stringifyURL(page.url)); |
278 }); | 278 }); |
279 | 279 |
280 NotificationStorage.addShowListener(showNotification); | 280 NotificationStorage.addShowListener(showNotification); |
OLD | NEW |