Extends
Methods
(protected) actuallySubscribe(subscribeId, id) → {Promise.<undefined>}
- Source:
Add a section present on the current page to the subscription list.
Parameters:
Name | Type | Description |
---|---|---|
subscribeId |
string | |
id |
string | Unused. |
Returns:
- Type
- Promise.<undefined>
(protected) actuallyUnsubscribe(subscribeId, id) → {Promise.<undefined>}
- Source:
Remove a section present on the current page from the subscription list.
Parameters:
Name | Type | Description |
---|---|---|
subscribeId |
string | |
id |
string | Unused. |
Returns:
- Type
- Promise.<undefined>
areLoaded() → {boolean}
- Source:
Test if the subscription list is loaded.
Returns:
- Type
- boolean
getState(subscribeId) → (nullable) {boolean}
- Source:
- Inherited From:
Get the subscription state of a section or the page.
Parameters:
Name | Type | Description |
---|---|---|
subscribeId |
string |
Throws:
Returns:
- Type
- boolean
(async) getSubscriptions(ids) → {Promise.<object>}
- Source:
Get a list of subscriptions for a list of section IDs from the server.
Parameters:
Name | Type | Description |
---|---|---|
ids |
Array.<string> | List of section IDs. |
Returns:
- Type
- Promise.<object>
getType() → {string}
- Source:
- Inherited From:
Get the subscriptions type. In practice, returns 'dt'
or 'legacy'
based on the used class.
Returns:
- Type
- string
itemsToKeys(arr) → {Array.<object>}
- Source:
- Inherited From:
For internal use. Convert the subscription list to the standard format, with section IDs as keys instead of array elements, to store it.
Parameters:
Name | Type | Description |
---|---|---|
arr |
Array.<string> | Array of section IDs. |
Returns:
- Type
- Array.<object>
(async) load() → {Promise.<undefined>}
- Source:
Request the subscription list from the server and assign it to the instance.
Returns:
- Type
- Promise.<undefined>
(async) loadToTalkPage(bootProcessopt, …argsopt)
- Source:
- Inherited From:
Do everything .load does and also perform manipulations with the talk page.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
bootProcess |
BootProcess |
<optional> |
|
args |
* |
<optional> <repeatable> |
processOnTalkPage(bootProcessopt)
- Source:
- Overrides:
Process subscriptions when they are loaded to a talk page.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
bootProcess |
BootProcess |
<optional> |
(async) subscribe(subscribeId, id, unsubscribeHeadlineopt, quietopt)
- Source:
- Inherited From:
Subscribe to a section.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
subscribeId |
string | Section's DiscussionTools ID. |
||
id |
string | Section's ID. |
||
unsubscribeHeadline |
string |
<optional> |
Headline of a section to unsubscribe from (at the same time). |
|
quiet |
boolean |
<optional> |
false
|
Don't show a success notification. |
(async) unsubscribe(subscribeId, id, quietopt, sectionopt)
- Source:
- Inherited From:
Unsubscribe from a section.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
subscribeId |
string | Section's DiscussionTools ID. |
||
id |
string | Section's ID. |
||
quiet |
boolean |
<optional> |
false
|
Don't show a success notification. |
section |
Section |
<optional> |
Section being unsubscribed from, if any, for legacy subscriptions. |
(protected) updateLocally(subscribeId, subscribe)
- Source:
- Inherited From:
Update the subscription list by adding or removing a subscription, without saving anything to the server.
Parameters:
Name | Type | Description |
---|---|---|
subscribeId |
string | Section's subscribe ID (modern or legacy format). |
subscribe |
boolean | Subscribe or unsubscribe. |
(protected) updatePageSubscribeButton()
- Source:
- Inherited From:
Update the page subscription button label and tooltip.