Template:User script table/doc
Appearance
![]() | This is a documentation subpage for Template:User script table. It may contain usage information, categories and other content that is not part of the original template page. |
![]() | This template uses TemplateStyles: |
![]() | This template uses Lua: |
{{user script table}} and {{user script table row}} are used to render tables in Wikipedia:User scripts/List.
Usage
{{user script table}} embeds the TemplateStyles and renders the table head. {{user script table row}} is used between {{user script table}} and |}
to render the row for each script.
Example
Employing the full syntax:
{{user script table}} {{user script table row |code=User:Jackmcbarn/editProtectedHelper.js |doc=User:Jackmcbarn/editProtectedHelper |name=editProtectedHelper |desc=Quickly respond to [[WP:ER|edit requests]] with a form added to the bottom of request banners. |instruction='''[[Special:EditPage/Special:MyPage/common.js| Click here]]''' and paste:<div><code>{{subst:lusc|1=User:Jackmcbarn/editProtectedHelper.js}}</code></div> |skin=<!-- Ignored when |instruction= is specified --> |backlink=<!-- Ignored when |instruction= is specified --> |indent=0 }} |}
This is equivalent to:
{{user script table}} {{user script table row |code=User:Jackmcbarn/editProtectedHelper.js |desc=Quickly respond to [[WP:ER|edit requests]] with a form added to the bottom of request banners. }} |}
Which renders:
Name | Description | Users | |
---|---|---|---|
Total | Active | ||
editProtectedHelper (source) | Quickly respond to edit requests with a form added to the bottom of request banners. | 543 | 196 |
Parameters
Parameters for {{user script table row}}:
|code=
- Full page name of the script, usually starting in
User:
and ending in.js
. If omitted, it is generated by appending.js
to|doc=
. |doc=
- Full page name of the script documentation. If omitted, it is generated by removing the file extension from
|code=
, provided the page exists. |name=
- Script name. If omitted, it is generated from
|code=
or|doc=
. |desc=
- Script description.
|instruction=
- Installation instruction. If omitted, a boilerplate is used. Setting it to
no
hides the instruction altogether. |skin=
- The name of the .js file to link to in the installation instruction (e.g.
timeless
). Defaults tocommon
. If set toglobal
, it links to global.js on Meta-Wiki. Ignored if|instruction=
is specified. |backlink=
- Second argument for {{lusc}} in the installation instruction. Ignored if
|instruction=
is specified. |indent=
- Number of ems to indent the name in the first cell by. Provided mainly for backwards compatibility with the previous layout, where nested bullet points were used to indicate forks.
Only either |code=
or |doc=
is truly required.
Dependencies
The usage statistics is taken from Wikipedia:User scripts/Most imported scripts, by way of Module:User script table row/data.
See also
- {{userscript}}