Index: lib/whitelisting.js |
=================================================================== |
--- a/lib/whitelisting.js |
+++ b/lib/whitelisting.js |
@@ -16,17 +16,17 @@ |
*/ |
/** @module whitelisting */ |
"use strict"; |
const {defaultMatcher} = require("../adblockpluscore/lib/matcher"); |
const {Filter, RegExpFilter} = require("../adblockpluscore/lib/filterClasses"); |
-const {FilterNotifier} = require("../adblockpluscore/lib/filterNotifier"); |
+const {filterNotifier} = require("../adblockpluscore/lib/filterNotifier"); |
const {FilterStorage} = require("../adblockpluscore/lib/filterStorage"); |
const {extractHostFromFrame, isThirdParty} = require("./url"); |
const {port} = require("./messaging"); |
const {logWhitelistedDocument} = require("./hitLogger"); |
const {verifySignature} = require("../adblockpluscore/lib/rsa"); |
let sitekeys = new ext.PageMap(); |
@@ -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.size && filter.disabled) |
+ if (filter.subscriptionCount && filter.disabled) |
{ |
filter.disabled = false; |
} |
else |
{ |
filter.disabled = false; |
FilterStorage.addFilter(filter); |
} |
@@ -107,31 +107,31 @@ |
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.size) |
+ if (filter.subscriptionCount) |
filter.disabled = true; |
filter = checkWhitelisted(page); |
} |
}); |
function revalidateWhitelistingState(page) |
{ |
- FilterNotifier.emit( |
+ filterNotifier.emit( |
"page.WhitelistingStateRevalidate", |
page, checkWhitelisted(page) |
); |
} |
-FilterNotifier.on("filter.behaviorChanged", () => |
+filterNotifier.on("filter.behaviorChanged", () => |
{ |
browser.tabs.query({}, tabs => |
{ |
for (let tab of tabs) |
revalidateWhitelistingState(new ext.Page(tab)); |
}); |
}); |