User:PerfektesChaos/js/userspaceLinks

JavaScript gadget to put toolbox links on pages related to a particular user.

Currently there is only one feature (Subpages). Some more will be added later, when migrated labsconsole: tools are available.

Usage

edit
  • If your project has registered this as a gadget, just activate on your Preferences page.
  • Otherwise include the following lines into your common.js or skin dependant like vector.js:
mw.loader.load("//www.mediawiki.org/w/index.php?title=User:PerfektesChaos/js/userspaceLinks/r.js&action=raw&bcache=1&maxage=86400&ctype=text/javascript",
               "text/javascript");
  • If you are blocking scripts from sites other than your local Wiki you might need to put www.mediawiki.org on the whitelist.
  • The gadget works also with non-WMF sites using MediaWiki 1.18 or higher.

Effects

edit

The pages related to a particular user are:

Subpages

edit

A link is added to the portlet toolbox (usually on left hand side). It opens the list of all subpages related to this user.

If called from a user subpage itself, only this and deeper subpages are shown.

Special:Prefixindex is target here and cannot point to itself.

Codes

edit
Source code
ResourceLoader
Namespaces -1, 2, 3
mw.libs userspaceLinks

Other languages

edit

This gadget is prepared for multilingual support.