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

Side by Side Diff: messageResponder.js

Issue 29335261: Issue 154 - Adapted for change replacing isFrameWhitelisted with checkWhitelisted (Closed)
Patch Set: Created Feb. 2, 2016, 11:31 a.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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 break; 192 break;
193 case "filters.blocked": 193 case "filters.blocked":
194 var filter = defaultMatcher.matchesAny(message.url, message.requestType, 194 var filter = defaultMatcher.matchesAny(message.url, message.requestType,
195 message.docDomain, message.thirdParty); 195 message.docDomain, message.thirdParty);
196 callback(filter instanceof BlockingFilter); 196 callback(filter instanceof BlockingFilter);
197 break; 197 break;
198 case "filters.get": 198 case "filters.get":
199 if (message.what == "cssproperties") 199 if (message.what == "cssproperties")
200 { 200 {
201 var filters = []; 201 var filters = [];
202 var isFrameWhitelisted = require("whitelisting").isFrameWhitelisted; 202 var checkWhitelisted = require("whitelisting").checkWhitelisted;
203 203
204 if (!isFrameWhitelisted(sender.page, sender.frame, 204 if (!checkWhitelisted(sender.page, sender.frame,
205 RegExpFilter.typeMap.DOCUMENT | 205 RegExpFilter.typeMap.DOCUMENT |
206 RegExpFilter.typeMap.ELEMHIDE)) 206 RegExpFilter.typeMap.ELEMHIDE))
207 { 207 {
208 filters = CSSRules.getRulesForDomain(sender.frame.url.hostname); 208 filters = CSSRules.getRulesForDomain(sender.frame.url.hostname);
209 filters = filters.map(function(filter) 209 filters = filters.map(function(filter)
210 { 210 {
211 return { 211 return {
212 prefix: filter.selectorPrefix, 212 prefix: filter.selectorPrefix,
213 suffix: filter.selectorSuffix, 213 suffix: filter.selectorSuffix,
214 regexp: filter.regexpString 214 regexp: filter.regexpString
215 }; 215 };
216 }); 216 });
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 subscription.title = message.title; 341 subscription.title = message.title;
342 subscription.homepage = message.homepage; 342 subscription.homepage = message.homepage;
343 FilterStorage.addSubscription(subscription); 343 FilterStorage.addSubscription(subscription);
344 if (!subscription.lastDownload) 344 if (!subscription.lastDownload)
345 Synchronizer.execute(subscription); 345 Synchronizer.execute(subscription);
346 } 346 }
347 break; 347 break;
348 } 348 }
349 }); 349 });
350 })(this); 350 })(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