The following Wikipedia-user-reference outline is provided as an overview of and topical guide to userscripts:
Userscript – userscripts are programs, usually written in JavaScript, for extending the capability of one's browser and for modifying web pages. Using them is referred to as augmented browsing, and there are thousands of them available around the Internet. Those work through a browser extension, and some of them are designed to work on Wikipedia pages. Independent from those, Wikipedia includes a feature that allows users to install user scripts (designed specifically for use on Wikipedia) on their Wikipedia accounts, and those only work while a user is logged in on Wikipedia. Within the Wikipedia community, scripts designed to work via WP user accounts are referred to as "user scripts" (notice the space between "user" and "scripts").
This outline was written mostly with the JavaScript programmer in mind. It attempts to track down the source code for all userscripts (external and internal, including gadgets), and everything about developing user scripts (including gadgets) for Wikipedia and MediaWiki. MediaWiki is the program that Wikipedia is run on.
Note that most gadgets are JavaScript programs (the rest are css snippets). Gadgets are selected by user account, and therefore, those that are JavaScript programs are user scripts, though they are removed from user script lists once they become "gadgets". The type of gadgets that are JavaScript programs are covered by this outline.
Using scripts
editUsing Wikipedia user scripts
editWikipedia user scripts – powerful customizations written in JavaScript, authored by the community (Wikipedia users), that allow registered Wikipedians to change Wikipedia's interface, and process data (content), beyond the options available in preferences. Wikipedia user scripts are designed to be run from and while logged in to Wikipedia. On Wikipedia, a userscript feature is enabled for registered users that allows them to install userscripts on their user accounts to augment editing and viewing of the encyclopedia's pages.
- Frequently Asked Questions about user scripts –
- Easier editing with JavaScript – chapter from The Missing Manual. You don't have to understand JavaScript to use it. You just need to know the process for cutting and pasting chunks of code to your personal JavaScript file. This chapter shows you how.
- {{Install user script}} – this template should always be substituted (i.e., use importScript( '{{{1}}}' ); // Backlink: [[{{{1}}}]]).
- Wikipedia:User scripts/Requests – a place to request a user script that you wish existed.
Using userscripts in general
editUserscript – program, usually written in JavaScript, for modifying web pages to augment browsing. They are enabled in browsers by use of a userscript manager browser extension. Userscripts are often referred to as Greasemonkey scripts, named after the original userscript manager Greasemonkey for the Firefox browser. Some userscripts out there are designed to work on Wikipedia.
- Greasemonkey – Mozilla Firefox extension that allows users to install scripts that make on-the-fly changes to web page content after or before the page is loaded in the browser. Firefox changed its extension system as of version 57, and so Greasemonkey 4 (Fall, 2017) was almost a complete rewrite. Because of this, some Greasemonkey scripts written before that no longer work.
Writing Wikipedia user scripts
edit- User Scripts Guide – guide on writing user scripts for Wikimedia sites. Of course, to write user scripts, you will need to have some knowledge of JavaScript.
- mw:Gadget kitchen – tutorial on writing userscripts/gadgets.
- Common techniques – techniques for achieving common tasks needed in writing user scripts.
- Help:Customizing toolbars
- Dive into Greasemonkey – even though it was written in 2005, it still includes many patterns that are relevant to writing user scripts on Wikipedia.
Modules, and loading dependencies
edit- mw:mw.config – to ease JavaScript programming, the MediaWiki software exposes a number of configuration values in an object called mw.config. It is always available, and contains lots of useful stuff.
- mw:ResourceLoader
Global scripts
editGlobal scripts – these scripts work on all users, or a specific group of users, on a wiki, if installed on that wiki. They are included here because what's in them may affect how your scripts work, and so you may need to look at them.
- MediaWiki:Common.js – works on all skins, but ignored by the mobile website provided by MW:Extension:MobileFrontend
- MediaWiki:skinname.js – per skin, for example MediaWiki:Vector.js
- MediaWiki:Group-group.js – per user group, for example MediaWiki:Group-sysop.js
- MediaWiki:Mobile.js – specific to the mobile website and provided by MW:Extension:MobileFrontend
- Special:Gadgets
Caveats
edit- Automated editing – scripts that modify and save the contents of pages without editor interaction are bots, and must be approved by the bot department before they can be used on Wikipedia. An example of a bot would be any script that saves a page that it has worked on, rather than leave it to the user to do so. Only editors and approved bots are allowed to save.
JavaScript resources
editJavaScript – the programming language that user scripts are written in.
- Draft:Outline of JavaScript – overview of everything on Wikipedia about the JavaScript ecosystem. A programming language's ecosystem includes everything to do with that programming language, including its system requirements, its components, extensions of it, tools for writing in it, the programs written in it, books and tutorials about it, its standards, its development community, and so on. Everything.
- Index of JavaScript-related articles – alphabetical list of articles on Wikipedia about JavaScript.
- Wikipedia:WikiProject JavaScript/Reference library – list of articles, bibliographies, e-books, glossaries, study guides, tutorials, and videos about JavaScript.
- Wikipedia:WikiProject JavaScript –
- IRC channel –
- Greasemonkey – Mozilla Firefox extension that allows users to install scripts that make on-the-fly changes to web page content after or before the page is loaded in the browser.
- Firebug –
MediaWiki's JavaScript support pages
edit- mw:ResourceLoader
- mw:ResourceLoader/Modules – all modules part of MediaWiki core
- mw:jQuery
- JavaScript code conventions
- mw:JavaScript performance
- mw:Snippets — helpful code snippets!
- mw:Extension:Gadgets & mw:Gadget kitchen – how site admins and users can write JavaScript to modify and extend MediaWiki behavior
Actual user scripts
editActual Wikipedia user scripts
editLooking for Wikipedia user scripts? This section provides links to where you can find them, and lists some of the more useful or interesting scripts.
Lists of Wikipedia user scripts
edit- Main script list –
- Most imported scripts
- Exhaustive script list (category) –
- Code snippets –
- User:Writ Keeper/Scripts (27 scripts)
- Other:
- Deprecated script list –
- Wikipedia:WikiProject User scripts/Scripts/(All pages) – inactive/historical list
Most gadgets are user scripts
editWikipedia:Gadget – userscript and/or a CSS snippet that can be enabled simply by checking an option in your preferences. The gadget's function is provided by the MediaWiki extension Extension:Gadgets. Gadgets are among the best user scripts, and their sourcecode is of the highest quality JavaScript programming on Wikipedia.
- Wikipedia:Gadget#Currently installed gadgets – partial list of installed gadgets, with descriptions
- Gadgets list – preference menu of gadgets
- Special:Gadgets – list of the preferences entries for gadgets, along with a link to the source page (script, or css snippet) for each
- MediaWiki:Gadgets-definition –
- mw:Gadget kitchen – tutorial on writing userscripts/gadgets.
Bots written in JavaScript
editScripts on the old WikiProject User Scripts subpages
edit- 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 edit section 0
- 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/All diffs above here
- Wikipedia:WikiProject User scripts/Scripts/All diffs above here/doc
- Wikipedia:WikiProject User scripts/Scripts/AutoAFD.js
- 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/CloseAFD.js/sandbox.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/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/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/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/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/POV tool
- 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/RBL check
- Wikipedia:WikiProject User scripts/Scripts/Rationale
- Wikipedia:WikiProject User scripts/Scripts/Re-order menus
- 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/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/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
- Wikipedia:WikiProject User scripts/Scripts/WikiBreak Enforcer/script/sandbox
- Wikipedia:WikiProject User scripts/Scripts/addLink
- Wikipedia:WikiProject User scripts/Scripts/addOnloadFunction.js
- Wikipedia:WikiProject User scripts/Scripts/hideOwn.js
- Wikipedia:WikiProject User scripts/Scripts/livepreview.js
- Wikipedia:WikiProject User scripts/Scripts/qSig
- Wikipedia:WikiProject User scripts/Scripts/removeAccessKeys
- Wikipedia:WikiProject User scripts/Scripts/test-enhanced
- Wikipedia:WikiProject User scripts/Scripts/test-n.js
- Wikipedia:WikiProject User scripts/Scripts/warn.js
External userscripts that work on Wikipedia pages
editJavascript programs in general
editTemplates
edit- {{InstallUserScript}} –
- {{Infobox user script}} –
- {{user script developer}} –
- {{userscript}} –
User scripts subpage list
edit- Wikipedia:User scripts/Function template
- Wikipedia:User scripts/Guide
- Wikipedia:User scripts/List
- Wikipedia:User scripts/Module template
- Wikipedia:User scripts/Navbox
- Wikipedia:User scripts/Requests
- Wikipedia:User scripts/Snippets
- Wikipedia:User scripts/Techniques
- Wikipedia:User scripts/sandbox
See also
edit- Augmented browsing –
- MediaWiki Extensions –
- Wikipedia:Bots –
- Wikipedia:Customisation –
- Wikipedia:Gadgets –
- Wikipedia:Scripts –
- Wikipedia:Tools –
- User styles –
Place these
edit- Wikipedia:User scripts/Function template
- Wikipedia:User scripts/List/Header
- Wikipedia:User scripts/Module template
- Wikipedia:User scripts/Navbox
- Wikipedia:User scripts/Requests
- Wikipedia:User scripts/Requests/Archive 01a
- Wikipedia:User scripts/Requests/Archive 01b
- Wikipedia:User scripts/Snippets
- Wikipedia:User scripts/Techniques
- Wikipedia:User scripts/sandbox
- Wikipedia:WikiProject User scripts/Fulfilled requests/Archive index
- Wikipedia:WikiProject User scripts/Members
- Wikipedia:WikiProject User scripts/Old requests
- Wikipedia:WikiProject User scripts/Piles
- Wikipedia:WikiProject User scripts/Requests/Header
- Wikipedia:WikiProject User scripts/Requests/New
- Wikipedia:WikiProject User scripts/Scripts cleanup
- Wikipedia:WikiProject User scripts/Scripts cleanup/Non-working
- Wikipedia:WikiProject User scripts/User-script manager
- Wikipedia:WikiProject User scripts/preferences
- Wikipedia:WikiProject User scripts/tabs