| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 chrome.notifications.onButtonClicked.addListener(function(notificationId, butt
onIndex) | 123 chrome.notifications.onButtonClicked.addListener(function(notificationId, butt
onIndex) |
| 124 { | 124 { |
| 125 notificationButtonClick(buttonIndex); | 125 notificationButtonClick(buttonIndex); |
| 126 clearActiveNotification(notificationId); | 126 clearActiveNotification(notificationId); |
| 127 }); | 127 }); |
| 128 chrome.notifications.onClicked.addListener(clearActiveNotification); | 128 chrome.notifications.onClicked.addListener(clearActiveNotification); |
| 129 chrome.notifications.onClosed.addListener(notificationClosed); | 129 chrome.notifications.onClosed.addListener(notificationClosed); |
| 130 } | 130 } |
| 131 | 131 |
| 132 /** | 132 /** |
| 133 * Initilizes the notification system. | 133 * Initializes the notification system. |
| 134 */ | 134 */ |
| 135 exports.initNotifications = function() | 135 exports.initNotifications = function() |
| 136 { | 136 { |
| 137 if (canUseChromeNotifications) | 137 if (canUseChromeNotifications) |
| 138 initChromeNotifications(); | 138 initChromeNotifications(); |
| 139 initAntiAdblockNotification(); | 139 initAntiAdblockNotification(); |
| 140 }; | 140 }; |
| 141 | 141 |
| 142 let showNextNotification = | 142 let showNextNotification = |
| 143 /** | 143 /** |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 if (activeNotification.type == "question") | 220 if (activeNotification.type == "question") |
| 221 notificationButtonClick(approved ? 0 : 1); | 221 notificationButtonClick(approved ? 0 : 1); |
| 222 else if (approved) | 222 else if (approved) |
| 223 openNotificationLinks(); | 223 openNotificationLinks(); |
| 224 } | 224 } |
| 225 } | 225 } |
| 226 prepareNotificationIconAndPopup(); | 226 prepareNotificationIconAndPopup(); |
| 227 }; | 227 }; |
| 228 | 228 |
| 229 setTimeout(showNextNotification, 3 * 60 * 1000); | 229 setTimeout(showNextNotification, 3 * 60 * 1000); |
| LEFT | RIGHT |