Class: SpecialSubscription

SpecialSubscription(url, titleopt)

new SpecialSubscription(url, titleopt)

Class for special filter subscriptions (user's filters)
Parameters:
Name Type Attributes Description
url string see Subscription()
title string <optional>
see Subscription()
Source:

Extends

Members

(private) _filterText :Array.<string>

Filter text contained in the filter subscription.
Type:
  • Array.<string>
Inherited From:
Source:

(private, nullable) _filterTextIndex :Set.<string>

A searchable index of filter text in the filter subscription.
Type:
  • Set.<string>
Inherited From:
Source:

disabled :boolean

Defines whether the filters in the subscription should be disabled
Type:
  • boolean
Inherited From:
Source:

filterCount :number

The number of filters in the subscription.
Type:
  • number
Inherited From:
Source:

fixedTitle :boolean

Determines whether the title should be editable
Type:
  • boolean
Inherited From:
Source:

title :string

Title of the filter subscription
Type:
  • string
Inherited From:
Source:

(nullable) type :string

Type of the subscription
Type:
  • string
Inherited From:
Source:

url :string

Download location of the subscription
Type:
  • string
Inherited From:
Source:

Methods

(static) create(titleopt) → {SpecialSubscription}

Creates a new user-defined filter group.
Parameters:
Name Type Attributes Description
title string <optional>
title of the new filter group
Source:
Returns:
Type
SpecialSubscription

(static) createForFilter(filter) → {SpecialSubscription}

Creates a new user-defined filter group and adds the given filter to it. This group will act as the default group for this filter type.
Parameters:
Name Type Description
filter Filter
Source:
Returns:
Type
SpecialSubscription

addFilter(filter)

Adds a filter to the subscription.
Parameters:
Name Type Description
filter Filter
Inherited From:
Source:

addFilterText(filterText)

Adds a filter to the subscription.
Parameters:
Name Type Description
filterText string
Inherited From:
Source:

clearFilters()

Removes all filters from the subscription.
Inherited From:
Source:

deleteFilterAt(index)

Deletes a filter from the subscription.
Parameters:
Name Type Description
index number The index at which to delete the filter.
Inherited From:
Source:

filterText() → {Iterator.<string>}

Returns an iterator that yields the text for each filter in the subscription.
Inherited From:
Source:
Returns:
Type
Iterator.<string>

filterTextAt(index) → (nullable) {Filter}

Returns the filter text at the given 0-based index.
Parameters:
Name Type Description
index number
Inherited From:
Source:
Returns:
Type
Filter

findFilterIndex(filter, fromIndexopt) → {number}

Returns the 0-based index of the given filter.
Parameters:
Name Type Attributes Description
filter Filter
fromIndex number <optional>
The index from which to start the search.
Inherited From:
Source:
Returns:
Type
number

(package) hasFilterText(filterText) → {boolean}

Checks whether the subscription has the given filter text.
Parameters:
Name Type Description
filterText string
Inherited From:
Source:
Returns:
Type
boolean

insertFilterAt(filter, index)

Inserts a filter into the subscription.
Parameters:
Name Type Description
filter Filter
index number The index at which to insert the filter.
Inherited From:
Source:

serialize() → {string}

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

(package) updateFilterText(filterText) → {Object}

Updates the filter text of the subscription.
Parameters:
Name Type Description
filterText Array.<string> The new filter text.
Inherited From:
Source:
Returns:
An object containing two lists of the text of added and removed filters respectively.
Type
Object