Template:Userscript/doc

This is an old revision of this page, as edited by Equazcion (talk | contribs) at 08:56, 6 October 2013. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

This template is used to create userscript listings, primarily for use at Wikipedia:User scripts, but it can be used on any page.

Usage

{{ userscript |name= [script name] |code= [.js address] |doc= [documentation page address] }}

All parameters are optional except for "name", however the template is not of much use without at least a .js path or a documentation path.


Example: {{userscript|name=Sharebox|code=User:TheDJ/sharebox.js|doc=User:TheDJ/Sharebox}}

Produces: Sharebox[1] (source)

  • If a documentation page exists with a name that matches the code page name (without its .js extension), that documentation page will be linked automatically, with no |doc= parameter required.
  • You can still enter a |doc= parameter explicitly if you want to override the automatic link.

Example: {{userscript|name=Sharebox|code=User:TheDJ/sharebox.js}}

Produces: Sharebox[2] (source)

Additional parameter

This template enables automatic installation for editors who use User:Equazcion/ScriptInstaller. To disable automatic installation, use the following parameter:

|noautoinstall=yes


  1. ^ Copy the following code, edit your user JavaScript, then paste:
    {{subst:lusc|1=User:TheDJ/sharebox.js}}
  2. ^ Copy the following code, edit your user JavaScript, then paste:
    {{subst:lusc|1=User:TheDJ/sharebox.js}}