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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 fakeFrame = { | 215 fakeFrame = { |
216 parent: fakeFrame, | 216 parent: fakeFrame, |
217 location: { | 217 location: { |
218 href: message.frames[i].location | 218 href: message.frames[i].location |
219 }, | 219 }, |
220 document: { | 220 document: { |
221 documentElement: {} | 221 documentElement: {} |
222 }, | 222 }, |
223 QueryInterface: function() {return this;}, | 223 QueryInterface: function() {return this;}, |
224 getInterface: function() {return this;}, | 224 getInterface: function() {return this;}, |
225 usePrivateBrowsing: (fakeFrame ? fakeFrame.usePrivateBrowsing : message.
frames[i].privateBrowsing) | 225 usePrivateBrowsing: message.isPrivate |
226 }; | 226 }; |
227 fakeFrame.top = fakeFrame.parent || fakeFrame; | 227 fakeFrame.top = fakeFrame.parent || fakeFrame; |
228 if (!fakeFrame.parent) | 228 if (!fakeFrame.parent) |
229 fakeFrame.parent = fakeFrame; | 229 fakeFrame.parent = fakeFrame; |
230 | 230 |
231 let sitekey = message.frames[i].sitekey || null; | 231 let sitekey = message.frames[i].sitekey || null; |
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; |
(...skipping 202 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 |