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

Side by Side Diff: messageResponder.js

Issue 29340898: Issue 3999 - Response to filters.get/cssproperties message should contain filter text (Closed)
Patch Set: Created April 27, 2016, 5: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 | « no previous file | no next file » | 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-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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 if (!checkWhitelisted(sender.page, sender.frame, 215 if (!checkWhitelisted(sender.page, sender.frame,
216 RegExpFilter.typeMap.DOCUMENT | 216 RegExpFilter.typeMap.DOCUMENT |
217 RegExpFilter.typeMap.ELEMHIDE)) 217 RegExpFilter.typeMap.ELEMHIDE))
218 { 218 {
219 filters = CSSRules.getRulesForDomain(sender.frame.url.hostname); 219 filters = CSSRules.getRulesForDomain(sender.frame.url.hostname);
220 filters = filters.map(function(filter) 220 filters = filters.map(function(filter)
221 { 221 {
222 return { 222 return {
223 prefix: filter.selectorPrefix, 223 prefix: filter.selectorPrefix,
224 suffix: filter.selectorSuffix, 224 suffix: filter.selectorSuffix,
225 regexp: filter.regexpString 225 regexp: filter.regexpString,
226 text: filter.text
226 }; 227 };
227 }); 228 });
228 } 229 }
229 callback(filters); 230 callback(filters);
230 break; 231 break;
231 } 232 }
232 233
233 var subscription = Subscription.fromURL(message.subscriptionUrl); 234 var subscription = Subscription.fromURL(message.subscriptionUrl);
234 if (!subscription) 235 if (!subscription)
235 { 236 {
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 if (subscription instanceof DownloadableSubscription) 373 if (subscription instanceof DownloadableSubscription)
373 Synchronizer.execute(subscription, true); 374 Synchronizer.execute(subscription, true);
374 } 375 }
375 break; 376 break;
376 case "subscriptions.isDownloading": 377 case "subscriptions.isDownloading":
377 callback(Synchronizer.isExecuting(message.url)); 378 callback(Synchronizer.isExecuting(message.url));
378 break; 379 break;
379 } 380 }
380 }); 381 });
381 })(this); 382 })(this);
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld