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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 switch (activeButtons[buttonIndex].type) | 124 switch (activeButtons[buttonIndex].type) |
125 { | 125 { |
126 case "link": | 126 case "link": |
127 ext.pages.open(Utils.getDocLink(activeNotification.links[buttonIndex])); | 127 ext.pages.open(Utils.getDocLink(activeNotification.links[buttonIndex])); |
128 break; | 128 break; |
129 case "open-all": | 129 case "open-all": |
130 openNotificationLinks(); | 130 openNotificationLinks(); |
131 break; | 131 break; |
132 case "configure": | 132 case "configure": |
133 Prefs.notifications_showui = true; | 133 Prefs.notifications_showui = true; |
134 ext.showOptions(function(page) | 134 ext.showOptions(Prefs["new_options_page"], function(page) |
135 { | 135 { |
136 page.sendMessage({ | 136 page.sendMessage({ |
137 type: "app.respond", | 137 type: "app.respond", |
138 action: "focusSection", | 138 action: "focusSection", |
139 args: ["notifications"] | 139 args: ["notifications"] |
140 }); | 140 }); |
141 }); | 141 }); |
142 break; | 142 break; |
143 case "question": | 143 case "question": |
144 NotificationStorage.triggerQuestionListeners(activeNotification.id, button
Index == 0); | 144 NotificationStorage.triggerQuestionListeners(activeNotification.id, button
Index == 0); |
(...skipping 126 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 |