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

Unified Diff: lib/filterClasses.js

Issue 30009560: Noissue - Rename lib/domain.js to lib/url.js (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Add tests for domainSuffixes Created Feb. 19, 2019, 2:36 a.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/elemHide.js ('k') | lib/matcher.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/filterClasses.js
===================================================================
--- a/lib/filterClasses.js
+++ b/lib/filterClasses.js
@@ -18,17 +18,17 @@
"use strict";
/**
* @fileOverview Definition of Filter class and its subclasses.
*/
const {extend} = require("./coreUtils");
const {filterToRegExp} = require("./common");
-const {normalizeHostname, suffixes} = require("./domain");
+const {normalizeHostname, domainSuffixes} = require("./url");
const {filterNotifier} = require("./filterNotifier");
const resources = require("../data/resources.json");
/**
* Map of internal resources for URL rewriting.
* @type {Map.<string,string>}
*/
@@ -601,17 +601,17 @@
if (!domains)
return true;
// If the document has no host name, match only if the filter
// isn't restricted to specific domains
if (!docDomain)
return domains.get("");
- for (docDomain of suffixes(normalizeHostname(docDomain)))
+ for (docDomain of domainSuffixes(normalizeHostname(docDomain)))
{
let isDomainIncluded = domains.get(docDomain);
if (typeof isDomainIncluded != "undefined")
return isDomainIncluded;
}
return domains.get("");
},
« no previous file with comments | « lib/elemHide.js ('k') | lib/matcher.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld