| 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-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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 filter = match(page, frame.url, typeMask, docDomain, sitekey); | 80 filter = match(page, frame.url, typeMask, docDomain, sitekey); |
| 81 frame = parent; | 81 frame = parent; |
| 82 } | 82 } |
| 83 | 83 |
| 84 return filter; | 84 return filter; |
| 85 } | 85 } |
| 86 | 86 |
| 87 return match(page, page.url, typeMask); | 87 return match(page, page.url, typeMask); |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 port.on("filters.isPageWhitelisted", (message, sender) => | |
| 91 { | |
| 92 return !!checkWhitelisted(sender.page); | |
| 93 }); | |
| 94 | |
| 95 function revalidateWhitelistingState(page) | 90 function revalidateWhitelistingState(page) |
| 96 { | 91 { |
| 97 FilterNotifier.emit( | 92 FilterNotifier.emit( |
| 98 "page.WhitelistingStateRevalidate", | 93 "page.WhitelistingStateRevalidate", |
| 99 page, checkWhitelisted(page) | 94 page, checkWhitelisted(page) |
| 100 ); | 95 ); |
| 101 } | 96 } |
| 102 | 97 |
| 103 FilterNotifier.on("filter.behaviorChanged", () => | 98 FilterNotifier.on("filter.behaviorChanged", () => |
| 104 { | 99 { |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 { | 189 { |
| 195 chrome.webRequest.onHeadersReceived.addListener( | 190 chrome.webRequest.onHeadersReceived.addListener( |
| 196 onHeadersReceived, | 191 onHeadersReceived, |
| 197 { | 192 { |
| 198 urls: ["http://*/*", "https://*/*"], | 193 urls: ["http://*/*", "https://*/*"], |
| 199 types: ["main_frame", "sub_frame"] | 194 types: ["main_frame", "sub_frame"] |
| 200 }, | 195 }, |
| 201 ["responseHeaders"] | 196 ["responseHeaders"] |
| 202 ); | 197 ); |
| 203 } | 198 } |
| OLD | NEW |