Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: lib/notificationHelper.js

Issue 29340749: Issue 3816 - Add hidden toggle for the new options page (Closed)
Patch Set: Update adblockplusui dependency Created April 22, 2016, 12:43 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « dependencies ('k') | lib/prefs.js » ('j') | metadata.common » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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)
Sebastian Noack 2016/05/12 12:35:20 Besides, duplicating logic, this also has the effe
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
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);
OLDNEW
« no previous file with comments | « dependencies ('k') | lib/prefs.js » ('j') | metadata.common » ('J')

Powered by Google App Engine
This is Rietveld