Index: lib/filterComposer.js |
=================================================================== |
--- a/lib/filterComposer.js |
+++ b/lib/filterComposer.js |
@@ -95,24 +95,20 @@ |
for (let url of details.urls) |
{ |
let urlObj = new URL(url, details.baseURL); |
+ url = stringifyURL(urlObj); |
- if (urlObj.protocol == "http:" || urlObj.protocol == "https:") |
+ let filter = defaultMatcher.whitelist.matchesAny( |
+ url, details.type, docDomain, |
+ isThirdParty(urlObj, docDomain), |
+ getKey(page, frame) |
+ ); |
+ |
+ if (!filter) |
{ |
- url = stringifyURL(urlObj); |
+ let filterText = url.replace(/^[\w\-]+:\/+(?:www\.)?/, "||"); |
- let filter = defaultMatcher.whitelist.matchesAny( |
- url, details.type, docDomain, |
- isThirdParty(urlObj, docDomain), |
- getKey(page, frame) |
- ); |
- |
- if (!filter) |
- { |
- let filterText = url.replace(/^[\w\-]+:\/+(?:www\.)?/, "||"); |
- |
- if (filters.indexOf(filterText) == -1) |
- filters.push(filterText); |
- } |
+ if (filters.indexOf(filterText) == -1) |
+ filters.push(filterText); |
} |
} |