| LEFT | RIGHT |
| 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-present eyeo GmbH | 3 * Copyright (C) 2006-present 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 filter = match(page, frame.url, typeMask, docDomain, sitekey); | 81 filter = match(page, frame.url, typeMask, docDomain, sitekey); |
| 82 frame = parent; | 82 frame = parent; |
| 83 } | 83 } |
| 84 | 84 |
| 85 return filter; | 85 return filter; |
| 86 } | 86 } |
| 87 | 87 |
| 88 return match(page, page.url, typeMask); | 88 return match(page, page.url, typeMask); |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 port.on("filters.isWhitelisted", message => | 91 port.on("filters.isWhitelisted", message => |
| 92 { | 92 { |
| 93 return !!checkWhitelisted(new ext.Page(message.tab)); | 93 return !!checkWhitelisted(new ext.Page(message.tab)); |
| 94 }); | 94 }); |
| 95 | 95 |
| 96 port.on("filters.whitelist", message => | 96 port.on("filters.whitelist", message => |
| 97 { | 97 { |
| 98 let page = new ext.Page(message.tab); | 98 let page = new ext.Page(message.tab); |
| 99 let host = getDecodedHostname(page.url).replace(/^www\./, ""); | 99 let host = getDecodedHostname(page.url).replace(/^www\./, ""); |
| 100 let filter = Filter.fromText("@@||" + host + "^$document"); | 100 let filter = Filter.fromText("@@||" + host + "^$document"); |
| 101 if (filter.subscriptions.length && filter.disabled) | 101 if (filter.subscriptions.length && filter.disabled) |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 { | 225 { |
| 226 chrome.webRequest.onHeadersReceived.addListener( | 226 chrome.webRequest.onHeadersReceived.addListener( |
| 227 onHeadersReceived, | 227 onHeadersReceived, |
| 228 { | 228 { |
| 229 urls: ["http://*/*", "https://*/*"], | 229 urls: ["http://*/*", "https://*/*"], |
| 230 types: ["main_frame", "sub_frame"] | 230 types: ["main_frame", "sub_frame"] |
| 231 }, | 231 }, |
| 232 ["responseHeaders"] | 232 ["responseHeaders"] |
| 233 ); | 233 ); |
| 234 } | 234 } |
| LEFT | RIGHT |