Class CopyrightProblemsSession

A CopyrightProblemsPage that represents a page that currently exists on a document. This document must be a MediaWiki page, and does not accept Parsoid-based documents (due to the lack of mw.config), used to get canonical data about the current page.

To ensure that only an active document (either a current tab or a document within an IFrame) can be used, the constructor only takes in a Document.

This class runs on:

  • The main Wikipedia:Copyright problems page
  • Wikipedia:Copyright problems subpages (which may/may not be date-specific entries)

Hierarchy (view full)

Constructors

Properties

document: Document

The document to use for reading operations

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

  • Adds a panel containing the "new listing" buttons (single and multiple) and the panel container (when filing a multiple-page listing) to the proper location: either at the end of the copyright problems section or replacing the redlink to the blank copyright problems page.

    Returns void

  • 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
    • Optionalcomments: string
    • Optionalpresumptive: 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
    • Optionalcomments: string
    • Optionalpresumptive: boolean

    Returns Promise<void>