Index: lib/whitelisting.js |
=================================================================== |
--- a/lib/whitelisting.js |
+++ b/lib/whitelisting.js |
@@ -88,17 +88,17 @@ |
return !!checkWhitelisted(new ext.Page(message.tab)); |
}); |
port.on("filters.whitelist", message => |
{ |
let page = new ext.Page(message.tab); |
let host = page.url.hostname.replace(/^www\./, ""); |
let filter = Filter.fromText("@@||" + host + "^$document"); |
- if (filter.subscriptions.length && filter.disabled) |
+ if (filter.subscriptions.size && filter.disabled) |
{ |
filter.disabled = false; |
} |
else |
{ |
filter.disabled = false; |
FilterStorage.addFilter(filter); |
} |
@@ -107,17 +107,17 @@ |
port.on("filters.unwhitelist", message => |
{ |
let page = new ext.Page(message.tab); |
// Remove any exception rules applying to this URL |
let filter = checkWhitelisted(page); |
while (filter) |
{ |
FilterStorage.removeFilter(filter); |
- if (filter.subscriptions.length) |
+ if (filter.subscriptions.size) |
filter.disabled = true; |
filter = checkWhitelisted(page); |
} |
}); |
function revalidateWhitelistingState(page) |
{ |
FilterNotifier.emit( |