Template:User script table/doc

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by imported>Colonies Chris at 14:22, 30 November 2025 (Undid revision 1324933573 by Nardog (talk); You may think the changes are unnecessary, but they provide greater clarity, and there's absolutely no point in undoing them. None of the possible reasons for not fixing redirects are applicable to these changes.). The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Lua error in Module:TNT at line 159: Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/Uses TemplateStyles.tab.

{{user script table}} and {{user script table row}} are used to render tables in Wikipedia:User scripts/List.

{{user script table}} embeds the TemplateStyles and renders the table head. {{user script table row}} is used between {{user script table}} and {{end}} to render the row for each script.

Example

[edit source]

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.
|indent=0
}}
{{end}}

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.
}}
{{end}}

Which renders:

Lua error in Module:User_script_table_row/data at line 4: bad argument #1 to 'gmatch' (string expected, got nil).
Name Description Users
Total Active

Parameters

[edit source]

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=. If set to none, the source link doesn't appear.
|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.
|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

[edit source]

The usage statistics is taken from Wikipedia:User scripts/Most imported scripts, by way of Module:User script table row/data.

TemplateData

[edit source]
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:User script table in articles based on its TemplateData.

TemplateData for User script table

A row used in the User script table. Only either |code= or |doc= is truly required.

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Codecode

Full page name of the script, usually starting in User: and ending in .js. If omitted, it is generated by appending .js to |doc=. If set to none, the source link doesn't appear.

Page namesuggested
Docdoc

Full page name of the script documentation. If omitted, it is generated by removing the file extension from |code=, provided the page exists.

Page namesuggested
Namename

Script name. If omitted, it is generated from |code= or |doc=.

Stringsuggested
Descriptiondesc

A short description of the script.

Stringsuggested
Indentionindent

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.

Stringoptional

See also

[edit source]

{{Wikipedia:User scripts/Navbox|expanded}}