OLD | NEW |
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-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 fakeFrame.document.documentElement.getAttribute = function(attr) | 232 fakeFrame.document.documentElement.getAttribute = function(attr) |
233 { | 233 { |
234 if (attr == "data-adblockkey") | 234 if (attr == "data-adblockkey") |
235 return sitekey; | 235 return sitekey; |
236 else | 236 else |
237 return null; | 237 return null; |
238 }; | 238 }; |
239 } | 239 } |
240 | 240 |
241 let {Policy} = require("contentPolicy"); | 241 let {Policy} = require("contentPolicy"); |
242 return !Policy.processNode(fakeFrame, fakeFrame.document, Policy.type.ELEMHI
DE, filter); | 242 return !Policy.processNode(fakeFrame, fakeFrame.document, "ELEMHIDE", filter
); |
243 }, | 243 }, |
244 | 244 |
245 /** | 245 /** |
246 * Will be set to true if apply() is running (reentrance protection). | 246 * Will be set to true if apply() is running (reentrance protection). |
247 * @type Boolean | 247 * @type Boolean |
248 */ | 248 */ |
249 _applying: false, | 249 _applying: false, |
250 | 250 |
251 /** | 251 /** |
252 * Will be set to true if an apply() call arrives while apply() is already | 252 * Will be set to true if an apply() call arrives while apply() is already |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 let filter = filterByKey[key]; | 438 let filter = filterByKey[key]; |
439 if (specificOnly && (!filter.domains || filter.domains[""])) | 439 if (specificOnly && (!filter.domains || filter.domains[""])) |
440 continue; | 440 continue; |
441 | 441 |
442 if (filter.isActiveOnDomain(domain) && !this.getException(filter, domain)) | 442 if (filter.isActiveOnDomain(domain) && !this.getException(filter, domain)) |
443 result.push(filter.selector); | 443 result.push(filter.selector); |
444 } | 444 } |
445 return result; | 445 return result; |
446 } | 446 } |
447 }; | 447 }; |
OLD | NEW |