| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 for (let type in browser.webRequest.ResourceType) | 66 for (let type in browser.webRequest.ResourceType) |
| 67 yield resourceTypes.get(browser.webRequest.ResourceType[type]) || "OTHER"; | 67 yield resourceTypes.get(browser.webRequest.ResourceType[type]) || "OTHER"; |
| 68 | 68 |
| 69 // WEBRTC gets addressed through a workaround, even if the webRequest API is | 69 // WEBRTC gets addressed through a workaround, even if the webRequest API is |
| 70 // lacking support to block this kind of a request. | 70 // lacking support to block this kind of a request. |
| 71 yield "WEBRTC"; | 71 yield "WEBRTC"; |
| 72 | 72 |
| 73 // POPUP, CSP and ELEMHIDE filters aren't mapped to resource types. | 73 // POPUP, CSP and ELEMHIDE filters aren't mapped to resource types. |
| 74 yield "POPUP"; | 74 yield "POPUP"; |
| 75 yield "ELEMHIDE"; | 75 yield "ELEMHIDE"; |
| 76 yield "SNIPPET"; |
| 76 yield "CSP"; | 77 yield "CSP"; |
| 77 }()); | 78 }()); |
| 78 | 79 |
| 79 function getDocumentInfo(page, frame, originUrl) | 80 function getDocumentInfo(page, frame, originUrl) |
| 80 { | 81 { |
| 81 return [ | 82 return [ |
| 82 extractHostFromFrame(frame, originUrl), | 83 extractHostFromFrame(frame, originUrl), |
| 83 getKey(page, frame, originUrl), | 84 getKey(page, frame, originUrl), |
| 84 !!checkWhitelisted(page, frame, originUrl, | 85 !!checkWhitelisted(page, frame, originUrl, |
| 85 RegExpFilter.typeMap.GENERICBLOCK) | 86 RegExpFilter.typeMap.GENERICBLOCK) |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 } | 329 } |
| 329 | 330 |
| 330 filterNotifier.on("subscription.added", onFilterChange); | 331 filterNotifier.on("subscription.added", onFilterChange); |
| 331 filterNotifier.on("subscription.removed", arg => onFilterChange(arg, false)); | 332 filterNotifier.on("subscription.removed", arg => onFilterChange(arg, false)); |
| 332 filterNotifier.on("subscription.updated", onFilterChange); | 333 filterNotifier.on("subscription.updated", onFilterChange); |
| 333 filterNotifier.on("subscription.disabled", arg => onFilterChange(arg, true)); | 334 filterNotifier.on("subscription.disabled", arg => onFilterChange(arg, true)); |
| 334 filterNotifier.on("filter.added", onFilterChange); | 335 filterNotifier.on("filter.added", onFilterChange); |
| 335 filterNotifier.on("filter.removed", onFilterChange); | 336 filterNotifier.on("filter.removed", onFilterChange); |
| 336 filterNotifier.on("filter.disabled", arg => onFilterChange(arg, true)); | 337 filterNotifier.on("filter.disabled", arg => onFilterChange(arg, true)); |
| 337 filterNotifier.on("load", onFilterChange); | 338 filterNotifier.on("load", onFilterChange); |
| LEFT | RIGHT |