User:Ugochimobi/LastEditor

This is the documentation page for the LastEditor.js user script.

LastEditor is a JavaScript user script that displays data about a page's last editor. The script provides links to the user's page, talk page, and contributions page, as well as displaying the time elapsed since the last edit, a link to the diff in question, an [m] marker in case of minor edits, and the edit summary of the last edit.

The script is inspired by Slyst's LastEdited script in use on the Wikia network in terms of its design and general appearance, and borrows a pair of functions from PleaseStand's UserInfo script to replicate the TimeAgo jQuery plugin.

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

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

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 time elapsed text, the diff link, and the edit summary, as well as adjust namespaces to suit their specific needs and exclude certain pages. An example window object is shown below: