style="width:100%;vertical-align:top;" | {{shortcut|WP:USL|WP:USLIST}}User scripts are powerful customisations, authored by the community, that allow registered Wikipedians to change Wikipedia's interface beyond the options available in preferences. This page provides a list of available scripts and instructions on installing them. User scripts are written in JavaScript.
- Click here to skip directly to the script list.
- Many of the most popular scripts become gadgets, and are subsequently removed from this page. You can enable them via Preferences – Gadgets. It is recommended that you check there first for any tool you might be looking for, since gadgets have been widely tested and proven useful and reliable.
- Most scripts are designed and tested primarily with the Vector skin, Wikipedia's current default.
{{anchor|How to install user scripts}}
How to install user scripts:
- Check the checkbox at {{myprefs|Gadgets|{{int:gadget-section-advanced}}|check={{int:Gadget-script-installer}}}} and click {{int:saveprefs}}.
- Come back to this page.
- Click "Install" after each script name to install the script. Some scripts may require additional steps, so be sure to visit the documentation if any.
Alternatively, you may use {{plain link|{{fullurl:Wikipedia:User scripts/List|withJS=MediaWiki:Gadget-script-installer.js}}|this link}} to temporarily view this page with script-installer enabled.
{{#invoke:navbox|navbox
| state = {{{state|collapsed}}}
| title = Manual install instructions
| navbar = plain
| listclass = vlist
| style = border: 2px ridge #CAE1FF;
| titlestyle = background-color: #BADFEB;
| groupstyle = background-color: #DFEFFF;
| liststyle = background-color: #E8F3FF; text-align:left; font-size:1.18em; padding:10px;
| list1 =
- First, make sure you are registered and logged in. Only logged-in users can install scripts.
- Edit your common.js file. Alternatively, you may use your skin.js to work only your current skin.
- Add the following line:
{{subst:Lusc|script_path}} – where "script_path" is the full name of the .js page that opens when a script's "(source)" link is clicked.
- * For example, to install the Sharebox script, add the following line:
{{subst:Lusc|User:TheDJ/sharebox.js}}
- * For scripts not located on this wiki, use:
- *:
mw.loader.load('//en.wikipedia.org/w/index.php?title=script.js&action=raw&ctype=text/javascript');
- * Consider adding a backlink by adding
//script_path to the end of the line, which aids script usage statistics.
- * Be sure to use
{{subst:Lusc|...}} – {{tl|Load user script}}. Do not use {{subst:Iusc|...}} – {{tl|Install user script}}.
- Save the page and bypass your cache to make sure the changes take effect.
}}
{{#invoke:navbox|navbox
| name = How to add new scripts to this list
| state = {{{state|collapsed}}}
| title = How to add new scripts to this list
| navbar = plain
| listclass = vlist
| style = border: 2px ridge #CAE1FF;
| titlestyle = background-color: #BADFEB;
| groupstyle = background-color: #DFEFFF;
| liststyle = background-color: #E8F3FF; text-align:left; font-size:1.18em; padding:5px 20px;
| list1 =
Use {{tl|user script table row}}. Include at least the code page path and a short description. Example:
| list2 =
{{user script table row
|name=My script
|code=User:Me/MyJSpage.js
|doc=User:Me/MyJSdocumentationPage
|desc=This script does something useful.
}}
| list3 =
- Name defaults to the code page's name, without its path or ".js".
- If a documentation page exists matching your .js page name, it will be linked automatically, without the need for a doc parameter. So, if your script is at User:Foo/Bar.js with a documentation page at User:Foo/Bar, and the script is called Bar, just write:
{{user script table row
|doc=User:Foo/Bar
|desc=Does stuff.
}}
| list4 = Want to advertise your user script development skills? Use {{tl|user script developer}}: {{user script developer}}
}} |