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

Side by Side Diff: lib/notificationHelper.js

Issue 29713631: Issue 5760 - Use relative require paths (Closed)
Patch Set: Address PS4 comments, rebase Created April 5, 2018, 11:09 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 | « lib/messaging.js ('k') | lib/options.js » ('j') | no next file with comments »
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-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
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18 /** @module notificationHelper */ 18 /** @module notificationHelper */
19 19
20 "use strict"; 20 "use strict";
21 21
22 const {startIconAnimation, stopIconAnimation} = require("icon"); 22 const {startIconAnimation, stopIconAnimation} = require("./icon");
23 const {Utils} = require("utils"); 23 const {Utils} = require("./utils");
24 const {Notification: NotificationStorage} = require("notification"); 24 const {Notification: NotificationStorage} =
25 const {stringifyURL} = require("url"); 25 require("../adblockpluscore/lib/notification");
26 const {initAntiAdblockNotification} = require("antiadblockInit"); 26 const {stringifyURL} = require("./url");
27 const {Prefs} = require("prefs"); 27 const {initAntiAdblockNotification} =
28 const {showOptions} = require("options"); 28 require("../adblockplusui/lib/antiadblockInit");
29 const {Prefs} = require("./prefs");
30 const {showOptions} = require("./options");
29 31
30 let activeNotification = null; 32 let activeNotification = null;
31 let activeButtons = null; 33 let activeButtons = null;
32 let defaultDisplayMethods = ["popup"]; 34 let defaultDisplayMethods = ["popup"];
33 let displayMethods = Object.create(null); 35 let displayMethods = Object.create(null);
34 displayMethods.critical = ["icon", "notification", "popup"]; 36 displayMethods.critical = ["icon", "notification", "popup"];
35 displayMethods.question = ["notification"]; 37 displayMethods.question = ["notification"];
36 displayMethods.normal = ["notification"]; 38 displayMethods.normal = ["notification"];
37 displayMethods.relentless = ["notification"]; 39 displayMethods.relentless = ["notification"];
38 displayMethods.information = ["icon", "popup"]; 40 displayMethods.information = ["icon", "popup"];
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 if (activeNotification) 311 if (activeNotification)
310 activeNotification.onClicked(); 312 activeNotification.onClicked();
311 }; 313 };
312 314
313 ext.pages.onLoading.addListener(page => 315 ext.pages.onLoading.addListener(page =>
314 { 316 {
315 NotificationStorage.showNext(stringifyURL(page.url)); 317 NotificationStorage.showNext(stringifyURL(page.url));
316 }); 318 });
317 319
318 NotificationStorage.addShowListener(showNotification); 320 NotificationStorage.addShowListener(showNotification);
OLDNEW
« no previous file with comments | « lib/messaging.js ('k') | lib/options.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld