Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/whitelisting.js

Issue 29907589: Issue 7054 - Update the adblockpluscore dependency to 5cb695da5a40, adblockplusui to f86abf2efdfd (Closed)
Patch Set: Address PS5 Comments Created Dec. 9, 2018, 4:27 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/subscriptionInit.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/whitelisting.js
===================================================================
--- a/lib/whitelisting.js
+++ b/lib/whitelisting.js
@@ -17,32 +17,32 @@
/** @module whitelisting */
"use strict";
const {defaultMatcher} = require("../adblockpluscore/lib/matcher");
const {Filter, RegExpFilter} = require("../adblockpluscore/lib/filterClasses");
const {filterNotifier} = require("../adblockpluscore/lib/filterNotifier");
-const {FilterStorage} = require("../adblockpluscore/lib/filterStorage");
+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();
function match(page, url, typeMask, docDomain, sitekey)
{
let thirdParty = !!docDomain && isThirdParty(url, docDomain);
if (!docDomain)
docDomain = url.hostname;
- let filter = defaultMatcher.whitelist.matchesAny(
+ let filter = defaultMatcher.matchesAny(
url.href, typeMask, docDomain, thirdParty, sitekey
);
if (filter && page)
logWhitelistedDocument(page.id, url.href, typeMask, docDomain, filter);
return filter;
}
@@ -95,28 +95,28 @@
let filter = Filter.fromText("@@||" + host + "^$document");
if (filter.subscriptionCount && filter.disabled)
{
filter.disabled = false;
}
else
{
filter.disabled = false;
- FilterStorage.addFilter(filter);
+ filterStorage.addFilter(filter);
}
});
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);
+ filterStorage.removeFilter(filter);
if (filter.subscriptionCount)
filter.disabled = true;
filter = checkWhitelisted(page);
}
});
function revalidateWhitelistingState(page)
{
« no previous file with comments | « lib/subscriptionInit.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld