Index: lib/abp2blocklist.js |
=================================================================== |
--- a/lib/abp2blocklist.js |
+++ b/lib/abp2blocklist.js |
@@ -309,16 +309,23 @@ |
trigger["if-domain"].push("*" + name); |
} |
} |
} |
else if (excluded.length > 0) |
{ |
trigger["unless-domain"] = excluded.map(name => "*" + name); |
} |
+ else if (filter instanceof filterClasses.BlockingFilter && |
+ filter.contentType & typeMap.SUBDOCUMENT) |
+ { |
+ trigger["unless-top-url"] = [trigger["url-filter"]]; |
+ if (trigger["url-filter-is-case-sensitive"]) |
+ trigger["top-url-filter-is-case-sensitive"] = true; |
+ } |
rules.push({trigger: trigger, action: {type: action}}); |
} |
function hasNonASCI(obj) |
{ |
if (typeof obj == "string") |
{ |