Jump to content

Wikipedia:User scripts

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 174.215.151.28 (talk) at 18:54, 11 September 2021 (Af). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

User scripts are programs written in JavaScript for use on Wikipedia by users. User scripts enable your user account to do many things that they otherwise couldn't. Many user scripts are available ready for you to install. Users may also write new user scripts, starting with an existing user script and modifying it, or starting from scratch.

The JavaScript WikiProject is the collaboration of editors to improve Wikipedia's JavaScript coverage, write user scripts, and maintain user script-related pages (like the one you are reading right now). If you would like to join, sign up here.

List of user scripts

If you come across or write a user script, please add it to Wikipedia:User scripts/List.

Don't see what you need? You can make a request for a new user script at Wikipedia:User scripts/Requests.

Writing user scripts

Instructions for writing your own user scripts are included in Wikipedia:User scripts/Guide.

Additional script-writing resources are presented below.

Snippets

The following code snippets still exist under the now defunct WikiProject User scripts. Many are still in use by live scripts, and they may provide insights for current script developers.

Stylesheets

CSS code in this section is added slightly differently to JavaScript code. The code can be imported by adding {{subst:css|Page_name}} to your monobook.js, or the code can be @imported into your monobook.css. You can just paste the source code if you do not wish to receive updates to the code when it is improved.

Name and link Purpose Compatible skins
externals Replaces the external link icon with the corresponding favicon (works for some links) Chick, Monobook, Myskin, and Simple
VectorButtons Give those boring gray standard buttons a Vector-like appearance All
accesskey Display corresponding access keys besides links.
RetroLogo Replace the top-left Wikipedia logo.

Userbox

Want to advertise your user script development skills?

Markup Renders as
{{user script developer}}
This user develops
user scripts;
{{user script developer2}}
This user develops user scripts.
{{user scripts created}}
This user has created a user script;
{{user scripts created|99}}
This user has created 99 user scripts;

See also