Class: CombinedMatcher

CombinedMatcher()

Combines a matcher for blocking and exception rules, automatically sorts rules into two Matcher instances.

Constructor

new CombinedMatcher()

Source:

Members

(private) _blacklist :Matcher

Matcher for blocking rules.
Type:
Source:

(private) _resultCache :Cache.<string, ?Filter>

Lookup table of previous Matcher#matchesAny results
Type:
Source:

(private) _whitelist :Matcher

Matcher for exception rules.
Type:
Source:

Methods

(private) _matchesAnyInternal()

Optimized filter matching testing both whitelist and blacklist matchers simultaneously. For parameters see Matcher.matchesAny().
Source:
See:

add(filter)

Parameters:
Name Type Description
filter Filter
Source:
See:

clear()

Source:
See:

(protected) findKeyword(filter) → {string}

Parameters:
Name Type Description
filter Filter
Source:
See:
Returns:
keyword
Type
string

isWhitelisted() → {boolean}

Tests whether the URL is whitelisted
Source:
See:
Returns:
Type
boolean

matchesAny()

Source:
See:

remove(filter)

Parameters:
Name Type Description
filter Filter
Source:
See:
Searches all blocking and whitelist filters and returns results matching the given parameters.
Parameters:
Name Type Attributes Default Description
url URL | URLInfo
typeMask number
docDomain string <optional>
<nullable>
sitekey string <optional>
<nullable>
specificOnly boolean <optional>
filterType string <optional>
all The types of filters to look for. This can be "blocking", "whitelist", or "all" (default).
Source:
Returns:
Type
MatcherSearchResults