Index: lib/devtools.js |
=================================================================== |
--- a/lib/devtools.js |
+++ b/lib/devtools.js |
@@ -78,19 +78,21 @@ |
record.request.docDomain == request.docDomain && |
// Ignore partial (e.g. ELEMHIDE) whitelisting if there is already |
// a DOCUMENT exception which disables all means of blocking. |
(record.request.type == "DOCUMENT" ? |
nonRequestTypes.includes(request.type) : |
record.request.type == request.type) && |
- // Matched element hiding filters don't relate to a particular request, |
- // so we have to compare the selector in order to avoid duplicates. |
- (record.filter && record.filter.selector) == (filter && filter.selector) |
+ // Matched element hiding and CSP filters don't relate to a particular |
+ // request, so we have to compare the selector or the CSP value in order to |
+ // avoid duplicates. |
Sebastian Noack
2019/01/30 19:54:25
This comment is misleading. $csp filter relate to
|
+ (record.filter && record.filter.selector) == (filter && filter.selector) && |
+ (record.filter && record.filter.csp) == (filter && filter.csp) |
); |
} |
function addRecord(panel, request, filter) |
{ |
if (!hasRecord(panel, request, filter)) |
{ |
panel.port.postMessage({ |