Class: ContentFilter

ContentFilter(text, domainsopt, body)

new ContentFilter(text, domainsopt, body)

Base class for content filters
Parameters:
Name Type Attributes Description
text string see Filter()
domains string <optional>
Host names or domains the filter should be restricted to
body string The body of the filter
Source:

Extends

Members

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, domainsopt, typeopt, body) → {ElemHideFilter|ElemHideException|ElemHideEmulationFilter|SnippetFilter|InvalidFilter}

Creates a content filter from a pre-parsed text representation
Parameters:
Name Type Attributes Description
text string same as in Filter()
domains string <optional>
domains part of the text representation
type string <optional>
rule type, either:
  • "" for an element hiding filter
  • "@" for an element hiding exception filter
  • "?" for an element hiding emulation filter
  • "$" for a snippet filter
  • body string body part of the text representation, either a CSS selector or a snippet script
    Source:
    Returns:
    Type
    ElemHideFilter | ElemHideException | ElemHideEmulationFilter | SnippetFilter | InvalidFilter

    (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