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-present eyeo GmbH | 3 * Copyright (C) 2006-present 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 case "link": | 119 case "link": |
120 browser.tabs.create({ | 120 browser.tabs.create({ |
121 url: Utils.getDocLink(activeNotification.links[buttonIndex]) | 121 url: Utils.getDocLink(activeNotification.links[buttonIndex]) |
122 }); | 122 }); |
123 break; | 123 break; |
124 case "open-all": | 124 case "open-all": |
125 openNotificationLinks(); | 125 openNotificationLinks(); |
126 break; | 126 break; |
127 case "configure": | 127 case "configure": |
128 Prefs.notifications_showui = true; | 128 Prefs.notifications_showui = true; |
129 showOptions(page => | 129 showOptions((page, port) => |
130 { | 130 { |
131 page.sendMessage({ | 131 port.postMessage({ |
132 type: "app.respond", | 132 type: "app.respond", |
133 action: "focusSection", | 133 action: "focusSection", |
134 args: ["notifications"] | 134 args: ["notifications"] |
135 }); | 135 }); |
136 }); | 136 }); |
137 break; | 137 break; |
138 case "question": | 138 case "question": |
139 NotificationStorage.triggerQuestionListeners(activeNotification.id, | 139 NotificationStorage.triggerQuestionListeners(activeNotification.id, |
140 buttonIndex == 0); | 140 buttonIndex == 0); |
141 NotificationStorage.markAsShown(activeNotification.id); | 141 NotificationStorage.markAsShown(activeNotification.id); |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 if (activeNotification) | 302 if (activeNotification) |
303 activeNotification.onClicked(); | 303 activeNotification.onClicked(); |
304 }; | 304 }; |
305 | 305 |
306 ext.pages.onLoading.addListener(page => | 306 ext.pages.onLoading.addListener(page => |
307 { | 307 { |
308 NotificationStorage.showNext(stringifyURL(page.url)); | 308 NotificationStorage.showNext(stringifyURL(page.url)); |
309 }); | 309 }); |
310 | 310 |
311 NotificationStorage.addShowListener(showNotification); | 311 NotificationStorage.addShowListener(showNotification); |
LEFT | RIGHT |