Global

Methods

Source:

For internal use. The entry function for the comment links adding mechanism.

module:processFragment()

Source:

For internal use. Perform URL fragment-related tasks.

Type Definitions

CommentSkeletonLike

Source:

Object with the same basic structure as CommentSkeleton has. (It comes from a web worker so its constructor is lost.)

Type:
  • object

Context

Source:
Properties:
Name Type Description
CommentClass function
SectionClass function
childElementsProp string
follows function
getAllTextNodes function
getElementByClassName function
rootElement Element | external:Element
areThereOutdents boolean
processAndRemoveDtElements function
removeDtButtonHtmlComments function
Type:
  • object

ParseIdReturn

Source:
Properties:
Name Type Description
date Date
author string
Type:
  • object

PassedData

Source:
Properties:
Name Type Attributes Description
html string <optional>

HTML code of the page content to replace the current content with.

commentId string <optional>

ID of a comment to scroll to.

sectionId string <optional>

ID of a section to scroll to.

pushState string <optional>

Whether to replace the URL in the address bar adding the comment ID to it if it's specified.

scrollY number <optional>

Page's Y offset.

unseenCommentIds Array.<object> <optional>

IDs of unseen comments on this page.

justWatchedSection string <optional>

Section just watched so that there could be not enough time for it to be saved to the server.

justUnwatchedSection string <optional>

Section just unwatched so that there could be not enough time for it to be saved to the server.

wasCommentFormSubmitted boolean <optional>

Did the user just submit a comment form.

Data passed from the previous page state.

Type:
  • object

SectionSkeletonLike

Source:

Object with the same basic structure as SectionSkeleton has. (It comes from a web worker so its constructor is lost.)

Type:
  • object

Events

beforeParse

Source:

The script is going to parse the page for comments, sections, etc.

Parameters:
Name Type Description
cd object

convenientDiscussions object.

changesSincePreviousVisit

Source:

Existing comments have changed since the previous visit.

Parameters:
Name Type Description
changeList Array.<object>
Properties
Name Type Description
comment Comment
commentsData object

commentFormCreated

Source:

A comment form has been created and added to the page.

Parameters:
Name Type Description
commentForm CommentForm
cd object

convenientDiscussions object.

commentFormCustomModulesReady

Source:

All the requested custom comment form modules have been loaded and executed. (The toolbar may not be ready yet if it's enabled; use event:commentFormToolbarReady for that.)

Parameters:
Name Type Description
commentForm CommentForm
cd object

convenientDiscussions object.

commentFormToolbarReady

Source:

The comment form toolbar is ready; all the requested custom comment form modules have been loaded and executed.

Parameters:
Name Type Description
commentForm CommentForm
cd object

convenientDiscussions object.

commentLayersCreated

Source:

An underlay and overlay have been created for a comment.

Parameters:
Name Type Description
comment Comment
cd object

convenientDiscussions object.

commentLinksAdded

Source:

Comments links have been added to the revisions listed on the page.

Parameters:
Name Type Description
$root external:jQuery

Root element of content to which the comment links were added.

cd object

convenientDiscussions object.

commentsReady

Source:

The script has processed comments, except for reformatting them in commentRegistry.reformatComments if the user opted in for that.

Parameters:
Name Type Description
comments object

convenientDiscussions.comments object.

cd object

convenientDiscussions object.

launched

Source:

The script has launched.

Parameters:
Name Type Description
cd object

convenientDiscussions object.

moreMenuSelectCreated

Source:

A "More options" menu select button has been created and added to the section actions element in place of a dummy button.

Parameters:
Name Type Description
section Section
cd object

convenientDiscussions object.

mutedUsers

Source:

The list of muted users has been obtained from the server or local storage.

Parameters:
Name Type Description
users Array.<module:userRegistry.User>

newChanges

Source:

Existing comments have changed (probably edited).

Parameters:
Name Type Description
changeList Array.<object>
Properties
Name Type Description
comment Comment
events object
Properties
Name Type Attributes Description
changed object <optional>
Properties
Name Type Attributes Description
updateSuccess boolean <optional>

Were the changes rendered.

unchanged boolean <optional>
deleted boolean <optional>
undeleted boolean <optional>
commentsData object

newCommentsHighlighted

Source:

New comments have been highlighted.

Parameters:
Name Type Description
cd object

convenientDiscussions object.

pageReady

Source:

The script has processed the page.

Parameters:
Name Type Description
cd object

convenientDiscussions object.

pageReadyFirstTime

Source:

The script has processed the page for the first time since the page load. Use this hook for operations that should run only once.

Parameters:
Name Type Description
cd object

convenientDiscussions object.

preprocessed

Source:

The page has been preprocessed (not parsed yet, but its type has been checked and some important mechanisms have been initialized).

Parameters:
Name Type Description
cd object

convenientDiscussions object.

previewReady

Source:

A comment preview has been rendered.

Parameters:
Name Type Description
$previewArea external:jQuery

CommentForm#$previewArea object.

cd object

convenientDiscussions object.

sectionsReady

Source:

The script has processed sections.

Parameters:
Name Type Description
sections object

convenientDiscussions.sections object.

cd object

convenientDiscussions object.

subscribeButtonAdded

Source:

A subscribe button has been added to the section actions element.

Parameters:
Name Type Description
section Section
cd object

convenientDiscussions object.