Class: RegExpFilter

RegExpFilter(text, regexpSource, contentTypeopt, matchCaseopt, domainsopt, thirdPartyopt, sitekeysopt, rewriteopt, nullable)

new RegExpFilter(text, regexpSource, contentTypeopt, matchCaseopt, domainsopt, thirdPartyopt, sitekeysopt, rewriteopt, nullable)

Abstract base class for RegExp-based filters
Parameters:
Name Type Attributes Description
text string see Filter()
regexpSource string filter part that the regular expression should be build from
contentType number <optional>
Content types the filter applies to, combination of values from RegExpFilter.typeMap
matchCase boolean <optional>
Defines whether the filter should distinguish between lower and upper case letters
domains string <optional>
Domains that the filter is restricted to, e.g. "foo.com|bar.com|~baz.com"
thirdParty boolean <optional>
Defines whether the filter should apply to third-party or first-party content only
sitekeys string <optional>
Public keys of websites that this filter should apply to
rewrite string <optional>
<nullable>
The name of the internal resource to which to rewrite the URL. e.g. if the value of the $rewrite option is abp-resource:blank-html, this should be blank-html.
Source:

Extends

Members

(static) typeMap

Maps type strings like "SCRIPT" or "OBJECT" to bit masks
Source:

text :string

String representation of the filter
Type:
  • string
Inherited From:
Source:

type :string

Filter type as a string, e.g. "blocking".
Type:
  • string
Inherited From:
Source:

Methods

(static) fromText(text) → {Filter}

Creates a RegExp filter from its text representation
Parameters:
Name Type Description
text string same as in Filter()
Source:
Returns:
Type
Filter

(package) [undefined]() → {ActiveFilter}

Yields the filter itself (required to optimize Matcher).
Inherited From:
Source:
Yields:
Type
ActiveFilter

serialize() → {string}

Serializes the filter for writing out on disk.
Inherited From:
Source:
Yields:
Type
string