Left: | ||
Right: |
LEFT | RIGHT |
---|---|
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-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
213 * Initializes the notification system. | 213 * Initializes the notification system. |
214 */ | 214 */ |
215 exports.initNotifications = function() | 215 exports.initNotifications = function() |
216 { | 216 { |
217 if (canUseChromeNotifications) | 217 if (canUseChromeNotifications) |
218 initChromeNotifications(); | 218 initChromeNotifications(); |
219 initAntiAdblockNotification(); | 219 initAntiAdblockNotification(); |
220 }; | 220 }; |
221 | 221 |
222 /** | 222 /** |
223 * Shows the next notification for the supplied URL, if any. | 223 * Shows the next notification (if any) for the supplied URL. |
Sebastian Noack
2015/06/12 17:14:19
Mind removing ", if any", since its mandatory now?
Felix Dahlke
2015/06/12 17:56:11
The "if any" was targeted at the notification, sin
Sebastian Noack
2015/06/12 18:12:51
Argh, you are right. I misread it. I think it make
Felix Dahlke
2015/06/12 18:24:08
Since the caller is not doing anything with the no
| |
224 * | 224 * |
225 * @param {URL} [url] URL to match notifications to | 225 * @param {URL} url URL to match notifications to |
Sebastian Noack
2015/06/12 17:14:19
Square brackets mean optional, which it isn't anym
Felix Dahlke
2015/06/12 17:56:11
Done.
| |
226 */ | 226 */ |
227 exports.showNextNotificationForUrl = function(url) | 227 exports.showNextNotificationForUrl = function(url) |
228 { | 228 { |
229 NotificationStorage.showNext(stringifyURL(url)); | 229 NotificationStorage.showNext(stringifyURL(url)); |
230 } | 230 } |
231 | 231 |
232 /** | 232 /** |
233 * Gets the active notification to be shown if any. | 233 * Gets the active notification to be shown if any. |
234 * | 234 * |
235 * @return {?object} | 235 * @return {?object} |
236 */ | 236 */ |
237 exports.getActiveNotification = function() | 237 exports.getActiveNotification = function() |
238 { | 238 { |
239 return activeNotification; | 239 return activeNotification; |
240 }; | 240 }; |
241 | 241 |
242 NotificationStorage.addShowListener(function(notification) | 242 NotificationStorage.addShowListener(function(notification) |
243 { | 243 { |
244 showNotification(notification); | 244 showNotification(notification); |
245 }); | 245 }); |
LEFT | RIGHT |