Index: lib/matcher.js |
=================================================================== |
--- a/lib/matcher.js |
+++ b/lib/matcher.js |
@@ -169,20 +169,29 @@ |
specificOnly) |
{ |
let set = this.filterByKeyword.get(keyword); |
if (typeof set == "undefined") |
return null; |
for (let filter of set) |
Manish Jethani
2018/10/13 13:28:45
The idea was to have two loops, one for the locati
Jon Sonesen
2018/10/20 23:07:55
Ack
|
{ |
+ if (typeMask == 0) |
+ continue; |
+ |
if (specificOnly && filter.isGeneric() && |
!(filter instanceof WhitelistFilter)) |
continue; |
+ if (!sitekey || !docDomain || !thirdParty) |
+ { |
Manish Jethani
2018/10/13 13:28:45
This seems wrong.
Jon Sonesen
2018/10/20 23:07:55
Yeah, super wrong. My bad
|
+ if (filter.matches(location)) |
+ return filter; |
+ } |
+ |
if (filter.matches(location, typeMask, docDomain, thirdParty, sitekey)) |
return filter; |
} |
return null; |
} |
/** |
* Tests whether the URL matches any of the known filters |