User:The Transhumanist/Outline of scripts

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

= Using Wikipedia user scripts =

Wikipedia 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.

= Using userscripts in general =

Userscript – 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.
  • [https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/ Download from addons.mozilla.org]
  • [https://wiki.greasespot.net/Greasemonkey_Manual Greasemonkey Manual] –
  • Wikipedia:Tools/Greasemonkey user scripts

Writing Wikipedia user scripts

  • 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
  • [http://manuals.chudov.com/diveintogreasemonkey-2005-05-09/diveintogreasemonkey.pdf 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 =

= Global scripts =

Global 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.

= Caveats =

  • 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

JavaScript – the programming language that user scripts are written in.

= MediaWiki's JavaScript support pages =

Actual user scripts

= Actual Wikipedia user scripts =

Looking 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 ==

== Most gadgets are user scripts ==

Wikipedia: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.

=== Bots written in JavaScript ===

::* User:Bot523

:::* Wikipedia:Bots/Requests for approval/Bot523

:::* Wikipedia:Bots/Requests for approval/Bot523 2

::* User:Cewbot

:::* [https://github.com/kanasimi/wikibot/blob/master/20160517.%E8%A7%A3%E6%B6%88%E6%B8%88%E3%81%BF%E4%BB%AE%E3%83%AA%E3%83%B3%E3%82%AF%E3%82%92%E3%83%AA%E3%83%B3%E3%82%AF%E3%81%AB%E7%BD%AE%E3%81%8D%E6%8F%9B%E3%81%88%E3%82%8B.js source code]

:::* Wikipedia:Bots/Requests for approval/Cewbot

::* User:Luasóg bot

:::* Source code: User:Luasóg bot/scripts/mainbelt

:::* Wikipedia:Bots/Requests for approval/Luasóg bot

:::* Wikipedia:Bots/Requests for approval/Luasóg bot 2

::* User:NationalRegisterBot

:::* Wikipedia:Bots/Requests for approval/NationalRegisterBot

:::* Wikipedia:Bots/Requests for approval/NationalRegisterBot 2

:::* source code found at: https://en.wikipedia.org/wiki/Special:PrefixIndex?prefix=Dudemanfellabra&namespace=2&hideredirects=1

::* User:TTObot

:::* Wikipedia:Bots/Requests for approval/TTObot

:::* Source code: User:This, that and the other/masstag.js

:::* [https://en.wikipedia.org/wiki/Special:PrefixIndex?prefix=TTObot&namespace=2 Bot's subpage listing]

:::* [https://en.wikipedia.org/wiki/Special:PrefixIndex?prefix=This%2C+that+and+the+other&namespace=2&hideredirects=1 Bot owner's subpage listing]

::* User:William Avery Bot

:::* [https://bitbucket.org/WilliamAvery/willsnodebot/src Source code]

:::* Wikipedia:Bots/Requests for approval/William Avery Bot

:::* [https://en.wikipedia.org/wiki/Special:PrefixIndex?prefix=William+Avery+Bot&namespace=2&hideredirects=1 Bot's subpage listing]

=== Scripts on the old WikiProject User Scripts subpages ===

= External userscripts that work on Wikipedia pages =

= Javascript programs in general =

  • [http://www.javascriptkit.com/cutpastejava.shtml free scripts from JavaScript Kit]

Templates

  • {{Tl|InstallUserScript}} –
  • {{Tl|Infobox user script}} –
  • {{Tl|user script developer}} –
  • {{Tl|userscript}} –

User scripts subpage list

See also

= Place these =