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

Delta Between Two Patch Sets: messageResponder.js

Issue 29375899: Issue 4871 - Start using ESLint for adblockplusui (Closed)
Left Patch Set: Addressed Wladimir's feedback, restored IIFEs Created March 10, 2017, 7:25 a.m.
Right Patch Set: Avoid violating operator-linebreak rule Created March 15, 2017, 4:43 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « lib/antiadblockInit.js ('k') | new-options.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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
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 /* globals require */ 18 /* globals require */
19 19
20 "use strict"; 20 "use strict";
21 21
22 (function(global)
22 { 23 {
23 if (typeof ext == "undefined") 24 let ext = global.ext || require("ext_background");
24 window.ext = require("ext_background");
25 25
26 const {port} = require("messaging"); 26 const {port} = require("messaging");
27 const {Prefs} = require("prefs"); 27 const {Prefs} = require("prefs");
28 const {Utils} = require("utils"); 28 const {Utils} = require("utils");
29 const {FilterStorage} = require("filterStorage"); 29 const {FilterStorage} = require("filterStorage");
30 const {FilterNotifier} = require("filterNotifier"); 30 const {FilterNotifier} = require("filterNotifier");
31 const {defaultMatcher} = require("matcher"); 31 const {defaultMatcher} = require("matcher");
32 const {ElemHideEmulation} = require("elemHideEmulation"); 32 const {ElemHideEmulation} = require("elemHideEmulation");
33 const {Notification: NotificationStorage} = require("notification"); 33 const {Notification: NotificationStorage} = require("notification");
34 34
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 changeListeners.set(page, listenerFilters); 149 changeListeners.set(page, listenerFilters);
150 } 150 }
151 return listenerFilters; 151 return listenerFilters;
152 } 152 }
153 153
154 port.on("app.get", (message, sender) => 154 port.on("app.get", (message, sender) =>
155 { 155 {
156 if (message.what == "issues") 156 if (message.what == "issues")
157 { 157 {
158 let subscriptionInit = tryRequire("subscriptionInit"); 158 let subscriptionInit = tryRequire("subscriptionInit");
159 return { 159 let result = subscriptionInit ? subscriptionInit.reinitialized : false;
160 filterlistsReinitialized: subscriptionInit 160 return {filterlistsReinitialized: result};
161 ? subscriptionInit.reinitialized : false
162 };
163 } 161 }
164 162
165 if (message.what == "doclink") 163 if (message.what == "doclink")
166 return Utils.getDocLink(message.link); 164 return Utils.getDocLink(message.link);
167 165
168 if (message.what == "localeInfo") 166 if (message.what == "localeInfo")
169 { 167 {
170 let bidiDir; 168 let bidiDir;
171 if ("chromeRegistry" in Utils) 169 if ("chromeRegistry" in Utils)
172 { 170 {
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 let {subscriptions} = FilterStorage; 421 let {subscriptions} = FilterStorage;
424 if (message.url) 422 if (message.url)
425 subscriptions = [Subscription.fromURL(message.url)]; 423 subscriptions = [Subscription.fromURL(message.url)];
426 424
427 for (let subscription of subscriptions) 425 for (let subscription of subscriptions)
428 { 426 {
429 if (subscription instanceof DownloadableSubscription) 427 if (subscription instanceof DownloadableSubscription)
430 Synchronizer.execute(subscription, true); 428 Synchronizer.execute(subscription, true);
431 } 429 }
432 }); 430 });
433 } 431 })(this);
LEFTRIGHT

Powered by Google App Engine
This is Rietveld