| Index: lib/abp2blocklist.js |
| =================================================================== |
| --- a/lib/abp2blocklist.js |
| +++ b/lib/abp2blocklist.js |
| @@ -637,17 +637,17 @@ |
| } |
| newSelector.push(selector.substring(i)); |
| return newSelector.join(""); |
| } |
| function addCSSRules(rules, selectors, domain, exceptionDomains) |
| { |
| - let unlessDomain = exceptionDomains.size > 0 ? [] : null; |
| + let unlessDomain = []; |
| exceptionDomains.forEach(name => |
| { |
| // For domain-specific filters, include the exception domains only if |
| // they're subdomains of the given domain. |
| if (!domain || name.substr(-domain.length - 1) == "." + domain) |
| unlessDomain.push("*" + name); |
| }); |
| @@ -662,17 +662,17 @@ |
| let rule = { |
| trigger: {"url-filter": matchDomain(domain), |
| "url-filter-is-case-sensitive": true}, |
| action: {type: "css-display-none", |
| selector: selector} |
| }; |
| - if (unlessDomain) |
| + if (unlessDomain.length > 0) |
| rule.trigger["unless-domain"] = unlessDomain; |
| rules.push(rule); |
| } |
| } |
| /** |
| * Check if two strings are a close match |