Content deleted Content added
No edit summary |
|||
Line 1:
{{Documentation subpage}}
{{intricate template}}
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
Line 7 ⟶ 8:
<code><nowiki>{{userscript |code= [.js address] |name= [script name] |doc= [documentation page address] }}</nowiki></code>
▲* The code page will be linked from a separate "(source)" link.
* All parameters are optional. The template will attempt to fill in defaults for the missing information. Enter any explicit parameters to override defaults.
* '''Check to make sure the links are accurate after placing this template!''' If any defaults are inaccurate, enter the necessary parameters explicitly.
* You can make up any name for the <code>|name</code> parameter. It is just for display purposes, and does not need to match any actual page address.
=== Logic ===
* Example: Entering <code>|code='''User:TheDJ/Sharebox'''.js</code> will look for a page named '''User:TheDJ/Sharebox''', and if found, will be linked as the documentation page.▼
* The template will add .js to the documentation page name to get a default code page, or remove .js from the code page name to get a default documentation page.
* If the default pages don't actually exist, they won't be linked (so no red links should be produced).
* If no name is entered, a default name will be produced from the code or doc page name (whichever is entered).
== Examples ==
▲*
*Produces: {{userscript|name=Sharebox|code=User:TheDJ/sharebox.js|doc=User:TheDJ/Sharebox}}▼
Name + doc specified: <code><nowiki>{{userscript|name=Sharebox|doc=User:TheDJ/Sharebox}}</nowiki></code>▼
▲*Produces: {{userscript|name=
▲Name + doc specified: <code><nowiki>{{userscript|name=
*Produces: {{userscript|name=sharebox!!!!!|doc=User:TheDJ/sharebox}}
Code only: <code><nowiki>{{userscript|code=User:TheDJ/sharebox.js}}</nowiki></code>
*Produces: {{userscript|code=User:TheDJ/sharebox.js}}
Doc only: <code><nowiki>{{userscript|doc=User:TheDJ/sharebox}}</nowiki></code>
*Produces: {{userscript|doc=User:TheDJ/sharebox}}
== Additional parameter ==
|