Class CopyrightProblemsListing

Represents an existing copyright problems listing. To add or create new listings, use the associated functions in CopyrightProblemsPage.

Constructors

Properties

basic: boolean
i: number
id: string

The listing page that this listing belongs to.

plainlinks: HTMLSpanElement
title: Title

Accessors

  • get articleCvRegex(): RegExp
  • Responsible for determining listings on a page. This method allows for full-metadata listing detection, and makes the process of detecting a given listing much more precise.

    This regular expression must catch three groups:

    • $1 - The initial * , used to keep the correct number of whitespace between parts.
    • $2 - The page title in the id="...", ONLY IF the page is listed with an article-cv-like template.
    • $3 - The page title in the wikilink, ONLY IF the page is listed with an article-cv-like template.
    • $4 - The page title, ONLY IF the page is a bare link to another page and does not use article-cv.

    Returns RegExp

    A regular expression.

Methods

  • Gets the line number of a listing based on the page's wikitext. This is further used when attempting to insert comments to listings.

    This provides an object with start and end keys. The start denotes the line on which the listing appears, the end denotes the last line where there is a comment on that specific listing.

    Use in conjunction with listingPage.getWikitext() to get the lines in wikitext.

    Returns Promise<{
        end: number;
        start: number;
    }>

    See documentation body.

  • Determines if a given element is a valid anchor element (<a>) which makes up a "listing" (a page for checking on the Copyright Problems page).

    Detection is based on the {{article-cv}} template. Changes to the template must be reflected here, with backwards compatibility for older listings. The {{anchor}} is not the tracked element here, since it remains invisible to the user.

    Parameters

    Returns false | FullCopyrightProblemsListingData

    Data related to the listing, for use in instantiation; false if not a listing.