Class CopyrightProblemsPage

A class that represents a Wikipedia:Copyright problems page, a page that lists a collection of accumulated copyright problems found on Wikipedia. Users who are not well-versed in copyright can submit listings there to be reviewed by more- knowledgeable editors.

This page can refer to any Copyright problems page, and not necessarily one that is running on the current tab. For that, CopyrightProblemsSession is used.

Hierarchy

Constructors

Properties

main: boolean

Whether this is the main page or not

revid: number

The current revision ID of the listing page. Helps in avoiding edit conflicts.

title: Title

The title of the listing page

wikitext: string

Cached wikitext. Based off of the revision ID.

pageCache: Map<string, CopyrightProblemsPage> = ...

Accessors

Methods

  • Generates the batch listing wikitext using wiki configuration values.

    Parameters

    • page: Title[]
    • title: string
    • Optional comments: string

    Returns string

    Wikitext

  • Posts a single page listing to this page, or (if on the root page), the page for the current date. Listings are posted in the following format:

    * {{subst:article-cv|Example}} <comment> ~~~~
    

    For posting multiple pages, use postListings.

    Parameters

    • page: Title
    • Optional comments: string
    • Optional presumptive: boolean

    Returns Promise<void>

  • Posts multiple pages under a collective listing. Used for cases where the same comment can be applied to a set of pages. Listings are posted in the following format:

    ;{{anchor|1=<title>}}<title>
    * {{subst:article-cv|1=Page 1}}
    * {{subst:article-cv|1=Page 2}}
    <comment> ~~~~

    Parameters

    • page: Title[]
    • title: string
    • Optional comments: string
    • Optional presumptive: boolean

    Returns Promise<void>

  • Handles appends to new listings. Also handles cases where the listing page is missing. If the listing is today's listing page, but the page is missing, the page will automatically be created with the proper header. If the listing is NOT today's page and is missing, this will throw an error.

    If the page was not edited since the page was missing, and the page was created in the time it took for us to find out that the page was missing (i.e., race condition), it will attempt to proceed with the original appending. If the edit still fails, an error is thrown.

    Parameters

    • content: string

      The content to append

    • summary: string

      The edit summary to use when appending

    • appendMode: boolean = true

    Returns Promise<void>

Generated using TypeDoc