GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Main page
  • Contents
  • Current events
  • Random article
  • About Wikipedia
  • Contact us
  • Help
  • Learn to edit
  • Community portal
  • Recent changes
  • Upload file
  • Special pages
  • Search
  • Donate

This view

  • Original page
  • New address

GeezerVison is showing en.wikipedia.org — Wikipedia:User scripts - Wikipedia

Page semi-protected
"WP:US" and "WP:WPUS" redirect here. For other uses, see WP:US (disambiguation).
"WP:JAVASCRIPT" redirects here. For the parent WikiProject, see Wikipedia:WikiProject JavaScript.

This is an information page.
It is not a Wikipedia policy or guideline; rather, its purpose is to explain certain aspects of Wikipedia's norms, customs, technicalities, or practices. It may reflect varying levels of consensus.
iconYou take full responsibility for any actions taken using any user script. You must read and abide by all relevant Wikipedia policies when using this tool; failure to do so may result in being blocked from editing.

User scripts are programs written in JavaScript to facilitate the editing of Wikipedia. User scripts enable user accounts to do things they otherwise could not. Many user scripts are available, ready for you to install. Also, you can write a new user script, either by modifying an existing script or by starting from scratch.

Security

User scripts have unlimited access to your account by their very nature – unlike OAuth/bot password based applications such as Huggle, where you can control access levels, the script runs in your browser. Anything you can do on Wikipedia, it can do. As such, and this is especially pertinent to users with advanced permissions, make sure that you trust the user who wrote the script, as you will be held responsible for any actions it takes on your behalf. If you are "importing" a script (instead of copying the code itself) be warned that the user you are importing from could alter their script at any time. Only import from users you trust.

List of user scripts

If you come across or write a user script, please add it to Wikipedia:User scripts/List and Category:Wikipedia scripts. To add new scripts to the main list, use the {{user script table row}} template. Include at least the code page path and a short description. For example:

{{user script table row
|name=My script
|code=User:Example/MyJSpage.js
|doc=User:Example/MyJSdocumentationPage
|desc=This script does something useful.
}}
  • 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.

Search for user scripts

Don't see what you need? You can request a new user script or search for an existing script.

Search within the code of user scripts:


Search user scripts by their title:


Installation

Automatic installation

  1. Check the checkbox at Preferences → Gadgets → Advanced → Tick Install scripts without having to manually edit JavaScript files (documentation) and click Save.
  2. Visit Wikipedia:User scripts/List.
  3. 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.

Manual installation

Method for scripts which are located on the English Wikipedia.

  1. First, make sure you are logged in. Only logged-in users can install user scripts.
  2. Click here to edit your common.js file.
  3. Add the following line: {{subst:Iusc|script_path}} – replace "script_path" with the full name of the .js page that opens when a script's "(source)" link is clicked. The Install user script (Iusc) template will add the necessary importScript() line along with a backlink.
    • For example, to install the Sharebox script, add the following line: {{subst:Iusc|User:TheDJ/sharebox.js}}
  4. Save the page and bypass your cache to make sure the changes take effect.

Remote scripts

Method for scripts which are not located on the English Wikipedia.

Many of these scripts may not work at other wikis, either because the wiki has a different setup or their home wiki's URL is hardcoded into the script. Most script authors probably don't think about how to make their script work at other wikis. If you install a script globally, then you should avoid also keeping a copy in your local common.js file. Otherwise, the same script is loaded twice when using that wiki and may cause issues.

  1. First, make sure you are logged in. Only logged-in users can install scripts.
  2. Edit your common.js file on the other wiki. Alternatively, you may use your skin.js to work only your current skin.
  3. Add the following line, replacing SCRIPT_PATH with the full name of the .js page that opens when a script's "(source)" link is clicked:
    mw.loader.load( '//en.wikipedia.org/wiki/SCRIPT_PATH?action=raw&ctype=text/javascript' );
    
    For example, to install the NoEditSummary script, add the following line:
    mw.loader.load( '//en.wikipedia.org/wiki/User:GhostInTheMachine/NoEditSummary.js?action=raw&ctype=text/javascript' );
    
  4. Save the page and bypass your cache to make sure the changes take effect.

Troubleshooting scripts

Main pages: Help:Safe mode and mw:Help:Locating broken scripts

If you encounter issues with a script, first try clearing your browser cache and purging the server cache. If you have any ad blockers or similar extensions installed, such as NoScript, check that wikipedia.org, wikimedia.org, mediawiki.org, and wikidata.org are exempted from any filters.

If you continue to experience problems, or if site functionality is significantly broken for you (for example, you are unable to edit any pages), you can enable safe mode to temporarily deactivate all on-wiki scripts and stylesheets.

To temporarily enable safe mode, add ?safemode=1 to the end of the web address (URL) of the page. Example: https://en.wikipedia.org/wiki/Main_Page?safemode=1. If the URL already includes a ?, add &safemode=1 instead. Example: https://en.wikipedia.org/w/index.php?title=Main_Page&safemode=1.

Safe mode can be enabled on all pages by default by going to your user preferences, selecting the Appearance tab, then enabling the Always enable safe mode option.

User scripts and site gadgets will not run on the user preferences page, so you can still make changes to your account, such as changing your password, even if you have a faulty script installed.

Writing user scripts

Main page: Wikipedia:User scripts/Guide

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.

Snippets

This list is transcluded from Wikipedia:User scripts/Snippets.

  • Wikipedia:WikiProject User scripts/preferences
  • Wikipedia:WikiProject User scripts/Scripts cleanup/Non-working
  • Wikipedia:WikiProject User scripts/Scripts/Add edit section 0
  • Wikipedia:WikiProject User scripts/Scripts/Add LI link
  • Wikipedia:WikiProject User scripts/Scripts/Add LI menu
  • Wikipedia:WikiProject User scripts/Scripts/Add LI menu/css
  • Wikipedia:WikiProject User scripts/Scripts/Add purge to tabs
  • Wikipedia:WikiProject User scripts/Scripts/Add tab
  • Wikipedia:WikiProject User scripts/Scripts/Add toolbox link
  • Wikipedia:WikiProject User scripts/Scripts/addLink
  • Wikipedia:WikiProject User scripts/Scripts/addOnloadFunction.js
  • Wikipedia:WikiProject User scripts/Scripts/All diffs above here
  • Wikipedia:WikiProject User scripts/Scripts/All diffs above here/doc
  • Wikipedia:WikiProject User scripts/Scripts/Autocopyvio.js
  • Wikipedia:WikiProject User scripts/Scripts/Autolink
  • Wikipedia:WikiProject User scripts/Scripts/Changes since I last edited
  • Wikipedia:WikiProject User scripts/Scripts/CleanupTab.js
  • Wikipedia:WikiProject User scripts/Scripts/CloseAFD
  • Wikipedia:WikiProject User scripts/Scripts/CloseAFD.js
  • Wikipedia:WikiProject User scripts/Scripts/CloseRFA.js
  • Wikipedia:WikiProject User scripts/Scripts/Compact Navigation
  • Wikipedia:WikiProject User scripts/Scripts/Compare link
  • Wikipedia:WikiProject User scripts/Scripts/Dashboard
  • Wikipedia:WikiProject User scripts/Scripts/defaultsort
  • Wikipedia:WikiProject User scripts/Scripts/Duplicate tabs at bottom
  • Wikipedia:WikiProject User scripts/Scripts/Easy db
  • Wikipedia:WikiProject User scripts/Scripts/Edit Top
  • Wikipedia:WikiProject User scripts/Scripts/Edit Top.js
  • Wikipedia:WikiProject User scripts/Scripts/External editor
  • Wikipedia:WikiProject User scripts/Scripts/Fix diff width
  • Wikipedia:WikiProject User scripts/Scripts/Force edit summary
  • Wikipedia:WikiProject User scripts/Scripts/Force edit summary alternative
  • Wikipedia:WikiProject User scripts/Scripts/Formatter
  • Wikipedia:WikiProject User scripts/Scripts/Formatter/Auto Edit Summary
  • Wikipedia:WikiProject User scripts/Scripts/Formatter/Auto Edit Summary/doc
  • Wikipedia:WikiProject User scripts/Scripts/Formatter/doc
  • Wikipedia:WikiProject User scripts/Scripts/Function template
  • Wikipedia:WikiProject User scripts/Scripts/Get Page Name
  • Wikipedia:WikiProject User scripts/Scripts/Get tidy title
  • Wikipedia:WikiProject User scripts/Scripts/Get user name
  • Wikipedia:WikiProject User scripts/Scripts/Google link
  • Wikipedia:WikiProject User scripts/Scripts/Google search
  • Wikipedia:WikiProject User scripts/Scripts/hideOwn.js
  • Wikipedia:WikiProject User scripts/Scripts/HistoryCount
  • Wikipedia:WikiProject User scripts/Scripts/Inclusion
  • Wikipedia:WikiProject User scripts/Scripts/Language Converter
  • Wikipedia:WikiProject User scripts/Scripts/Language Converter/Dictionary
  • Wikipedia:WikiProject User scripts/Scripts/Language Converter/Dictionary/en-GB
  • Wikipedia:WikiProject User scripts/Scripts/Language Converter/Dictionary/en-US
  • Wikipedia:WikiProject User scripts/Scripts/livepreview.js
  • Wikipedia:WikiProject User scripts/Scripts/Logs link
  • Wikipedia:WikiProject User scripts/Scripts/Module template
  • Wikipedia:WikiProject User scripts/Scripts/MotD closure script
  • Wikipedia:WikiProject User scripts/Scripts/Multi-NS search
  • Wikipedia:WikiProject User scripts/Scripts/New message history
  • Wikipedia:WikiProject User scripts/Scripts/Obsolete
  • Wikipedia:WikiProject User scripts/Scripts/Page exists
  • Wikipedia:WikiProject User scripts/Scripts/POV tool
  • Wikipedia:WikiProject User scripts/Scripts/qSig
  • Wikipedia:WikiProject User scripts/Scripts/Quick cleanup
  • Wikipedia:WikiProject User scripts/Scripts/Quick orphan
  • Wikipedia:WikiProject User scripts/Scripts/Quick wikify
  • Wikipedia:WikiProject User scripts/Scripts/Rationale
  • Wikipedia:WikiProject User scripts/Scripts/RBL check
  • Wikipedia:WikiProject User scripts/Scripts/Re-order menus
  • Wikipedia:WikiProject User scripts/Scripts/removeAccessKeys
  • Wikipedia:WikiProject User scripts/Scripts/Replace
  • Wikipedia:WikiProject User scripts/Scripts/Revert tools
  • Wikipedia:WikiProject User scripts/Scripts/Search links
  • Wikipedia:WikiProject User scripts/Scripts/Set Book Source
  • Wikipedia:WikiProject User scripts/Scripts/Show last diff
  • Wikipedia:WikiProject User scripts/Scripts/Show last secure diff
  • Wikipedia:WikiProject User scripts/Scripts/Show recent comments
  • Wikipedia:WikiProject User scripts/Scripts/Sigdash
  • Wikipedia:WikiProject User scripts/Scripts/Single column diffs
  • Wikipedia:WikiProject User scripts/Scripts/Six tabs
  • Wikipedia:WikiProject User scripts/Scripts/Sort Image Links
  • Wikipedia:WikiProject User scripts/Scripts/Syntax highlighter
  • Wikipedia:WikiProject User scripts/Scripts/Tag unverified image
  • Wikipedia:WikiProject User scripts/Scripts/Talk page section tabs
  • Wikipedia:WikiProject User scripts/Scripts/test-enhanced
  • Wikipedia:WikiProject User scripts/Scripts/test-n.js
  • Wikipedia:WikiProject User scripts/Scripts/Time
  • Wikipedia:WikiProject User scripts/Scripts/TimeTraveller
  • Wikipedia:WikiProject User scripts/Scripts/TimeTraveller.js
  • Wikipedia:WikiProject User scripts/Scripts/TwoColumns
  • Wikipedia:WikiProject User scripts/Scripts/TwoColumns.js
  • Wikipedia:WikiProject User scripts/Scripts/Unreferenced tool
  • Wikipedia:WikiProject User scripts/Scripts/Unwatch
  • Wikipedia:WikiProject User scripts/Scripts/Upload Preview
  • Wikipedia:WikiProject User scripts/Scripts/User Contribs Tabs
  • Wikipedia:WikiProject User scripts/Scripts/User tabs
  • Wikipedia:WikiProject User scripts/Scripts/VBS/Savewatchlisttofile
  • Wikipedia:WikiProject User scripts/Scripts/warn.js
  • Wikipedia:WikiProject User scripts/Scripts/Watchfilter
  • Wikipedia:WikiProject User scripts/Scripts/Watchlist since
  • Wikipedia:WikiProject User scripts/Scripts/Welcome user
  • Wikipedia:WikiProject User scripts/Scripts/WikiBreak Enforcer
  • Wikipedia:WikiProject User scripts/Scripts/WikiBreak Enforcer/script

Userbox

To advertise your user script development skills on your user page, you can use these userboxes.

MarkupRenders 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

  • Information on user scripts from Wikipedia: The Missing Manual
  • The most imported user scripts
  • WikiProject JavaScript, a collaboration of editors to improve Wikipedia's JavaScript coverage
Retrieved from "https://en.wikipedia.org/w/index.php?title=Wikipedia:User_scripts&oldid=1385109491"
Categories:
  • Wikipedia information pages
  • Wikipedia scripts
Hidden category:
  • Wikipedia semi-protected project pages
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.