| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 126 function revalidateWhitelistingState(page) | 126 function revalidateWhitelistingState(page) | 
| 127 { | 127 { | 
| 128   FilterNotifier.emit( | 128   FilterNotifier.emit( | 
| 129     "page.WhitelistingStateRevalidate", | 129     "page.WhitelistingStateRevalidate", | 
| 130     page, checkWhitelisted(page) | 130     page, checkWhitelisted(page) | 
| 131   ); | 131   ); | 
| 132 } | 132 } | 
| 133 | 133 | 
| 134 FilterNotifier.on("filter.behaviorChanged", () => | 134 FilterNotifier.on("filter.behaviorChanged", () => | 
| 135 { | 135 { | 
| 136   chrome.tabs.query({}, tabs => | 136   browser.tabs.query({}, tabs => | 
| 137   { | 137   { | 
| 138     for (let tab of tabs) | 138     for (let tab of tabs) | 
| 139       revalidateWhitelistingState(new ext.Page(tab)); | 139       revalidateWhitelistingState(new ext.Page(tab)); | 
| 140   }); | 140   }); | 
| 141 }); | 141 }); | 
| 142 | 142 | 
| 143 ext.pages.onLoading.addListener(revalidateWhitelistingState); | 143 ext.pages.onLoading.addListener(revalidateWhitelistingState); | 
| 144 | 144 | 
| 145 let getKey = | 145 let getKey = | 
| 146 /** | 146 /** | 
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 214       let key = checkKey(header.value, url); | 214       let key = checkKey(header.value, url); | 
| 215       if (key) | 215       if (key) | 
| 216       { | 216       { | 
| 217         recordKey(key, page, url); | 217         recordKey(key, page, url); | 
| 218         break; | 218         break; | 
| 219       } | 219       } | 
| 220     } | 220     } | 
| 221   } | 221   } | 
| 222 } | 222 } | 
| 223 | 223 | 
| 224 if (typeof chrome == "object") | 224 if (typeof browser == "object") | 
| 225 { | 225 { | 
| 226   chrome.webRequest.onHeadersReceived.addListener( | 226   browser.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 } | 
| OLD | NEW | 
|---|