PageCreator
DescriptionDisplays information concerning page's creator and first revision
Author(s)Eizen
StatusStable
UpdatedAugust 11, 2017; 7 years ago (2017-08-11)
BrowsersDeveloped in Google Chrome
SkinsVector
Monobook
SourceUser:Eizen/PageCreator.js
This is the documentation page for the PageCreator.js user script.

PageCreator, not be confused with the MediaWiki extension of the same name, is a JavaScript user script that displays data about a page's creator and first revision. The script provides links to the creator's user page, talk page, and contributions page, and displays the date and time of creation as a link to the first revision of the page.

It is meant to be paired with its twin user script LastEditor, with which it shares a similar design appearance and page placement, though it can be used independently.

Installation

edit

The script may be used in any personal common.js, vector.js, or monobook.js file.

importScript("User:Eizen/PageCreator.js");

It may be imported to a global.js file as well through the addition of the following import statement:

mw.loader.load("//en.wikipedia.org/w/index.php?title=User:Eizen/PageCreator.js&action=raw&ctype=text/javascript");

Alternatively, the script accepts a window object of user-defined variables that can alter script performance at will. By default, the script will display all data and will be prepended to the header of all pages listed in namespaces 0, 4, 8, and 10 (mainspace, Project, MediaWiki, and template). The window variables enable users to remove the timestamp and first revision link, display the timestamp in local or UTC time, adjust namespaces to suit their specific needs, and exclude certain pages. An example window object is shown below:

window.PageCreatorOptions = {
    namespaces: [0, 4, 8, 12, 14, 18],        // Custom namespace selection
    excluded: ["Elfin_woods_warbler"],        // Excluded page (must be encoded)
    useTimestamp: false,                      // Hides the timestamp and link to first revision
    useUTC: false                             // Displays the timestamp in local time
};
Variables Type Valid values Default value(s) Description
namespaces Array Any valid namespace [0, 4, 8, 10] An array of namespaces upon whose pages the script will be appended
excluded Array Any encoded page [] (empty array) An array of pages to be excluded (must be wgPageName of page)
useTimestamp Boolean true, false true Displays the time and date of page creation with a link to the first revision
useUTC Boolean true, false true Displays the timestamp in UTC as opposed to local time