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

Delta Between Two Patch Sets: messageResponder.js

Issue 29361722: Issue 4592 - Adapt messaging code for the new element hiding emulation filters (Closed) Base URL: https://bitbucket.org/fhd/adblockplusui
Left Patch Set: Wrap long line Created Nov. 4, 2016, 5:37 p.m.
Right Patch Set: Remove features property Created Nov. 21, 2016, 5:31 p.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 | « background.js ('k') | no next file » | 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
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 227
228 if (Prefs.enabled && !checkWhitelisted(sender.page, sender.frame, 228 if (Prefs.enabled && !checkWhitelisted(sender.page, sender.frame,
229 RegExpFilter.typeMap.DOCUMENT | 229 RegExpFilter.typeMap.DOCUMENT |
230 RegExpFilter.typeMap.ELEMHIDE)) 230 RegExpFilter.typeMap.ELEMHIDE))
231 { 231 {
232 var hostname = sender.frame.url.hostname; 232 var hostname = sender.frame.url.hostname;
233 filters = ElemHideEmulation.getRulesForDomain(hostname); 233 filters = ElemHideEmulation.getRulesForDomain(hostname);
234 filters = filters.map(function(filter) 234 filters = filters.map(function(filter)
235 { 235 {
236 return { 236 return {
237 features: filter.features,
238 selector: filter.selector, 237 selector: filter.selector,
239 text: filter.text 238 text: filter.text
240 }; 239 };
241 }); 240 });
242 } 241 }
243 callback(filters); 242 callback(filters);
244 break; 243 break;
245 } 244 }
246 245
247 var subscription = Subscription.fromURL(message.subscriptionUrl); 246 var subscription = Subscription.fromURL(message.subscriptionUrl);
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 for (var i = 0; i < subscriptions.length; i++) 402 for (var i = 0; i < subscriptions.length; i++)
404 { 403 {
405 var subscription = subscriptions[i]; 404 var subscription = subscriptions[i];
406 if (subscription instanceof DownloadableSubscription) 405 if (subscription instanceof DownloadableSubscription)
407 Synchronizer.execute(subscription, true); 406 Synchronizer.execute(subscription, true);
408 } 407 }
409 break; 408 break;
410 } 409 }
411 }); 410 });
412 })(this); 411 })(this);
LEFTRIGHT

Powered by Google App Engine
This is Rietveld