User:BrandonXLF/scripts/doc
< BrandonXLF's scripts | {{hlist|class=inline
| {{#ifexist:{{{page|{{FULLPAGENAME}}}}}.js|{{{page}}
| {{#ifexist:{{{page|{{FULLPAGENAME}}}}}.css|{{{page}}
}}
{{Infobox Wikipedia user script
| name = {{{name|{{#invoke:String|replace|{{SUBPAGENAME}}|(%l)(%u)|%1 %2||false}}}}}
| logo = {{{logo|}}}
| screenshot = {{{image|}}}
| screenshot-caption = {{{caption|}}}
| desc = {{{desc|}}} {{#if:{{{description|}}}|
{{{name|{{#invoke:String|replace|{{SUBPAGENAME}}|(%l)(%u)|%1 %2||false}}}}} {{{description|}}}}}
| author = {{{author|User:BrandonXLF}}}
| status = {{{status|Working}}}
| released = {{{released|}}}
| version = {{{version|}}}
| updated = {{{updated|}}}
| browsers = {{{browsers|}}}
| skins = {{{skins|}}}
| beta = {{{beta|}}}
| source = {{#ifexist:{{{page|{{FULLPAGENAME}}}}}.js|{{{page{{#if:{{{nogit|}}}||{{sp}}([https://github.com/{{{github|BrandonXLF/wikipedia-user-scripts}}}/blob/main/src/{{SUBPAGENAME}}.js git])}}}}{{#ifexist:{{{page|{{FULLPAGENAME}}}}}.css|{{#ifexist:{{{page|{{FULLPAGENAME}}}}}.js|
}}{{{page{{#if:{{{nogit|}}}||{{sp}}([https://github.com/{{{github|BrandonXLF/wikipedia-user-scripts}}}/blob/main/src/{{SUBPAGENAME}}.css git])}}}}{{#if:{{{source|}}}|{{#ifexist:{{{page|{{FULLPAGENAME}}}}}.js|{{#ifexist:{{{page|{{FULLPAGENAME}}}}}.js|
}}}}{{{source|}}}}}
| github = {{#if:{{{nogit|}}}||{{{github|BrandonXLF/wikipedia-user-scripts}}}}}
}}
{{{pre|}}}
{{{name|{{#invoke:String|replace|{{SUBPAGENAME}}|(%l)(%u)|%1 %2||false}}}}} {{{description|}}}
Installation
{{#if:{{{CSS|}}}|You can install this script using JavaScript (JS) or Cascading Style Sheets (CSS). CSS will allow the script to run right at load whereas JS may have a delay before applying, this means the scripts style won't work instantly using JS but will using CSS.
=Using JS=
}}
{{pre|1=import{{#if:{{{CSS|}}}|Stylesheet|Script}}('{{{page|{{FULLPAGENAME}}}}}.{{#if:{{{CSS|}}}|css|js}}'); //
- Alternatively, use the following instead of the above:
{{pre|1=mw.loader.load('/w/index.php?title={{{page|{{FULLPAGENAME}}}}}.{{#if:{{{CSS|}}}|css|js}}&action=raw&ctype=text/{{#if:{{{CSS|}}}|css|javascript}}'{{#if:{{{CSS|}}}|, 'text/css'}}); //
- To install on other wikis (for instance, globally in your global.js on the Meta-Wiki), use the following code:
{{pre|1=mw.loader.load('https://en.wikipedia.org/w/index.php?title={{{page|{{FULLPAGENAME}}}}}.{{#if:{{{CSS|}}}|css|js}}&action=raw&ctype=text/{{#if:{{{CSS|}}}|css|javascript}}'{{#if:{{{CSS|}}}|, 'text/css'}});}}
- After installing reload the page and clear your cac{{#if:{{{CSS|}}}|h
=Using CSS=
- Add the following to your common.css or your skin.css AT THE TOP (but after @charset):
{{pre|1=@import url(https://en.wikipedia.org/w/index.php?title={{{page|{{FULLPAGENAME}}}}}.css&action=raw&ctype=text/css); /*
- After installing reload the page and clear your cac|h}}{{#if:{{{v|{{{v1|}}}}}}|e
{{#invoke:Sandbox/BrandonXLF/user space|variables}}|e}}
{{{additional|}}}
Comments/Bugs
Comments are welcome on my talk page, be sure to indicate that you're talking about this script in the title. I would really like any suggestion to make the script run better.
{{#if:{{{see also|}}}|
See also
{{{see also|}}}
}}{{User:BrandonXLF/scripts/navbox}}
{{Lua|Module:Sandbox/BrandonXLF/user space}}
This page is used as a base for the documentations for User:BrandonXLF's user scripts.
Parameters
{{User:BrandonXLF/scripts/doc
| page =
| name =
| logo =
| image =
| caption =
| desc =
| author =
| status =
| released =
| version =
| updated =
| browsers =
| skins =
| beta =
| github =
| nogit =
| pre =
| description =
| CSS =
| additional =
| see also =
| v1 =
| d1 =
| e1 =
}}