User:Equazcion/sandbox1
Project Page | Talk Page | Scripts | Tutorial | Members |
- See this help page for more information on Wikipedia scripting. Also see Wikipedia:WikiProject User scripts/Old list of scripts for the script list that appeared on this page prior to 1 May 2012.
User scripts are customizations authored by the community that allow registered Wikipedia users to change Wikipedia's interface beyond the options available in preferences. This page provides a list of available scripts and provides instructions on installing them. User scripts are written in JavaScript.
Installation
There are generally 3 steps to script installation:
- First, make sure you are registered and logged in. Only logged-in users can install scripts.
- Navigate to Special:MyPage/common.js to see and edit your personal ".js" page. Alternatively, you may use Special:MyPage/skin.js to work only with the .js page that applies to your current skin.
- Edit your .js page and add the following line:
importScript('full_script_page_name');
then save the page. For example, to install the Sharebox script, add the following line:importScript('User:TheDJ/sharebox.js');
After installation, bypass your cache to make sure the changes take effect.
Additional notes
- Many scripts are designed and tested primarily with the Vector skin (Wikipedia's current default skin).
- If the script is not located on this wiki, you can use
mw.loader.load()
function to include it from there as shown in the following example. Take note of the explicit action= and ctype= options added to the URL. For example:mw.loader.load('//en.wikipedia.org/enwiki/w/index.php?title=script.js&action=raw&ctype=text/javascript');
- Some user scripts are made into gadgets; you can install them simply by selecting a checkbox in your Preferences.
- See Wikipedia:WikiProject User scripts/Old list of scripts for the script list that appeared on this page prior to 1 May 2012. It contains an extensive list of scripts that haven't been confirmed working recently.
- See Category:Wikipedia scripts for the most exhaustive list of user scripts.
Vector compatible
Multifunction tools
Several different types of tools in one script.
- Navigation Popups[1] (source) – Adds robust page previews and other tools, accessible via popups that display when rolling over links. Enable via Preferences → Gadgets → Navigation Popups
- Twinkle (source) – Easy tagging, delete nomination, user welcoming/notifications, vandalism reverts/warnings/reports, and more. Enable via Preferences → Gadgets → Twinkle
Site-wide appearance
For reading
Scripts that offer superficial site-wide changes to ease browsing.
- ReferenceTooltips[2] (source) – Adds tooltips to inline citations, so you don't need to jump away from the article text for reference information. Enable through Preferences → Gadgets → ReferenceTooltips
- Sharebox[3] (source) – Adds social networking share buttons.
- Hide Vector Sidebar[4] (source) – Hides the left sidebar in Vector. Can access the sidebar anytime by alt-shift-a.
- SidebarTranslate[5] (source) – Translates sidebar language links into English, adds Google Translate links.
- Smaller Templates[6] (source) – Makes maintenance templates appear smaller, both horizontally and vertically.
- Subject's Age From Year[7] (source) – Roll over any year in an article about a dated subject and see the age of that subject that year.
- mathJax (source) – High-quality LaTeX font typesetting via MathJax.
- wiktLookup[8] (source) – Double-click a word, and go to its definition on Wiktionary.
- FloatingTOC[9] (source) – Makes the Table of Contents float at the bottom left of the page, so you don't need to scroll back up to the top.
- goToTop[10] (source) - (Handy for phones) Adds a small button to the left of the page which moves to the top of the page instead of having to scroll there. If you installed this before May 2013, you will need to reinstall it.
- Floater[11] (source) - A discreet floating toolbar that appears when scrolling down a Wikipedia page, providing convenient access to the tools that appear at page tops.
Search
Modify the site's search bar.
- SearchNamespace[12] (source) – Adds a pulldown menu next to the quick search bar allowing selection of namespace to search in.
- Open search in new tab[13] (source) – Use Ctrl-click (PC) or Command-click (Mac) to open search results list or suggestions in new tab.
- Open search in new tab automatically[14] (source) – Open search results list or suggestions in new tab automatically.
- Google Title[15] (source) – Adds a link next to an article's title to search Google for that title in a new tab.
For editing
Scripts that offer superficial site-wide changes aimed at those who edit actively or participate in discussions.
Inline
- Link Classifier[16] (source) – Colors links on the page to indicate redirects, broken redirects, disambiguation pages, and XfDs by default.
- Duplinks[17] (source) – Highlights links that occur more than once in an article (separate for lead and body).
- Copy section link[18] (source) – Adds a linked pilcrow on section header mouseover for making section links faster/easier.
- Autolink[19] (source) – Makes plaintext [[wikilinks]], {{transclusions}}, and URLs clickable where they normally aren't (ae. in the History tab and on .js pages).
- intropreload[20] (source) - shows links next to page title to the edit intro and preloaded content (if they exist)
- WikiTrust – Click on text in an article to get information about who added that text, and when. Uses data from the WikiTrust project.
Discussion oriented
- Nominations Viewer[21] (source) - Collapses the nominations on pages like WP:FAC and WP:PR into expandable headers with basic information on the nomination, significantly decluttering the pages.
- Admin Rights[22] (source) – Highlights administrators in all listings and signatures.
- Mark Blocked[23] (source) – Marks blocked users in all listings and signatures (faded and struck-out username).
- Vote Symbols[24] (source) – Adds graphical icons to users' !votes in discussions.
- Comment Highlighter[25] (source) – Highlights your discussion comments.
- Deletion Finder[26] (source) – Adds links to the deletion log and any AfD discussions next to an article's title (only if there are any).
- Unclutter[27] (source) – hides excessive warnings, makes some of the interface collapsible and minimises signatures.
Menus and tabs
- Menu Tabs Toggle – Toggle between drop down menus and tabs in Vector. Preferences → Gadgets → Enable toggling between tabs and dropdown menus in the Vector skin.
- Menu To Tabs – Same as Dropdown To Tabs, but uses jQuery.
- 6 Tabs Vector – Shows edit and history tabs for both main and talk pages while viewing either one.
Toolbox
Scripts that add links to the toolbar that display additional information or highlight things.
- dabfinder - adds two link in the toolbox, one that highlights redirects and one that highlights disambiguation links.
- New Pages – Adds a link "Patrol New Pages" link in the toolbox.
- Sidebar History Tools – Brings the History page's Toolserver links (plus the Page logs link) to the sidebar, so you don't need to navigate to the History page first to see them.
- Prose Size – Adds a link to the sidebar's toolbox to view various page size statistics. Although useful for DYK, see DYKcheck for a more durable build.
Editing
Scripts that add to or refine editors' toolsets.
- HotCat – Adds links to the category bar that allow for quicker Ajax category editing. Enable through Preferences → Gadgets → HotCat.
- Yet Another AfC Helper Script – Easily review Articles for creation submissions and redirect requests using a powerful interface. Enable through Preferences → Gadgets → Yet Another AfC Helper Script.
- Heading editor – allows for one-click editing of section headings while reading an article
- Watchlist Notifier – Notification of changes to watched pages. Changes are checked on each page load, with notifications appearing at the top of the page under its title.
- No Edit Sandbox – Changes the "My sandbox" link to a regular page link, instead of loading the sandbox's edit page by default.
- ToggleEditNotices - Allows toggling of edit notices.
- Sagittarius — for editing redirects.
Editing interface
Scripts that enrich the site's editing interface or change the way it executes.
Inline
- wikEd – A comprehensive tool suite that can be enabled through Preferences → Gadgets → wikEd.
- Advisor – Flags possible issues with wikitext while editing a page.
- Autocomplete – Offers a popup suggestions menu whenever you start typing a link or template in the main edit box.
- Template parameters wizard – Helps fill parameters of templates.
- Bracket Match – Check matching for template and variable brackets.
Previewing
- ajaxPreview – Allows editing preview and changes without page reloading.
- Ajax Preview – Adds a button to the edit form to preview the current section, with a references section included.
- Split Preview – Shows editing previews beside the edit box instead of above or below.
- Preview: Template Last Modified – When previewing changes, sorts list of called templates by date last modified and displays the latest edit summary for each; useful for debugging complex templates.
- UniversalTransclusionPreviews - Preview transclusions from any namespace.
Extra functions
- Save&Edit – adds a small button to save the actual content and goes directly to the edit page again.
- Split Edit Summary Box – Creates a separate edit summary box for the name of the edited section, making the browser's autocomplete function more useful.
- Custom Summary Presets – Adds a menu below the edit summary line where you can choose from your own preset edit summaries.
- Revised version allowing theoretically infinite custom summaries using an array. Placed here due to User:Equazcion's suggestion.
- Math editor – Adds math editor for enhanced editing toolbar, which provides online preview while typing equations.
- Table Editor – add table editing helpers to the toolbar
- cksyntax – checks edited JavaScript for syntax errors before saving
- TemplateData Editor - Adds a link in the toolbox for editing
<templatedata>...</templatedata>
tags in templates.
Cleanup
Scripts docked to the toolbox that, when executed, automatically clean up the page in some manner.
- AutoEd – Cleanup various problems with markup, headlines, templates, and ISBNs.
- autoFormatter - A user script that semi-automatically fixes more than 200 common errors in wiki markup.
- dashes - fixes hyphens, dashes, and minus signs per MOS:DASH.
- EngvarB – British and Canadian spelling consistency per WP:ENGVAR.
- MOSNUM Dates – Cleanup dates per WP:MOSNUM.
- Common Terms – Delink common terms.
- formatgeneral – Formatting fixes per WP:MOS, MOSCAPS etc.
- Format Citations – Add a link (accessible in the drop-down menu in Vector and as a tab in Monobook) to harmonize whitespace in citation templates, and another to convert them to the vertical format.
- Close XfD – Add a link accessible in the drop-down menu in Vector and as a tab in Monobook that adds the appropriate header and footer to close any XfD discussion.
References
Scripts specific to page referencing.
- ProveIt GT – Popup forms to navigate and fill in references. Enable with Preferences → Gadgets → ProveIt
- editRefs - Adds a link to the toolbox which, when clicked, searches the article references and presents them in textboxes for ease of editing. More basic but faster and less intrusive alternative to ProveIt.
- HarvErrors – Displays errors when using Harv templates
- SnipManager – Toolbar with forms to fill in references.
- Sources – Aims for compliance with Help:Citation Style 1, WP:ITALICS: ensures consistency of source names, and general tidying within the reference section.
Vandalism
- rollbackSum – Rollback summary.
- Rollback All – Revert all contributions of a user
- Mass Rollback controlled – Rollback selected contributions of a user or all contribs of a user
- Igloo – Anti-vandal javascript GUI
- No Vandalism, a simple script catching edits with Repeating characters filter on them.
- Rollback "in place": Changes the behavior of "rollback" link: instead of jumping to the diff page, leaves you in the same page. Together with Gadget popup, this can make vandalism-fighting slightly more efficient. In addition, right-clicking the "rollback" link will let you enter a summary, instead of the standard rollback summary.
- Vandal warning toolbox - Quick links to standard warning messages in the Toolbox when editing a user talk page.
- Ajax Undo - Adds an Ajax undo link next to the normal undo link on page histories and on diff pages.
- Ajax Rollback - Turns rollback links into AJAX rollback links.
Diffs
- wikEdDiff – Adds additional functionality to diff display. Part of User:Cacycle/wikEd.js. Enabled when WikEd is enabled or through Preferences → Gadgets → wikEdDiff
- Diff Time – Adds time between diffs and time since each revision.
- Link Intermediate Revisions – Links the "intermediate revisions" message so it can be clicked to see a history listing of those revisions.
- In-place diffs - Adds buttons to each line on the Recent Changes screen, the watchlist, the contributions screen, and article history screens, allowing one to load (and show/hide after loading) an individual diff without moving to another page and view multiple diffs at once.
- User History with in-place diffs - Modification of Ale jrb's original UserHist script, which allows filtering of an article's edit history by author name, to add the inline diff functionality, as with the "In-place diffs" script above. (Note that the "In-place diffs" script is not required to use this one, but there is no overlap between the two; this one does not replace the general "In-place diffs" functionality).
- LiveDiffLink – Show a live-updated diff link at the top of History pages while you select revisions, so you don't need to actually load the diff to get a diff link.
User pages
- User Info – Shows user groups, edit count, and time registered.
- Sysop Detector – Shows user rights groups.
- ContribsTabVector – Adds contribs and stats tabs to user and user talk pages.
- Status Changer 2 – Allows a user to quickly change their displayed online status in a couple of clicks.
- Qui – Allows user to change their displayed status in one click.
- StatusChanger - Compatible with the {{UserStatus}} template; allows user to change their displayed status in one click.
- Edit counter – Adds a link to the toolbox to calculate your edits by namespace and write them to a table in your userspace.
- Status updater – Click on a status from a list visible to you or everyone to change your status.
Images
- ImageMapEdit – Adds a tool on image pages that allows the user to create and organize imagemaps much more easily.
- MegapixelDisplay – Displays the number of megapixels (106 pixels) on the image page.
Listings
Watchlist
Also see WP:CUSTOMWATCH for a list of possible Watchlist customizations.
- Smart Watchlist – Watchlist customization and organization.
- Watchlist Links – Adds some useful links to your Watchlist.
- Catwatch – Shows the addition of pages to specified categories on your watchlist.
- Interwiki Watchlist – adds interwiki watchlists to your watchlist; supports only a few popular wikis.
- RemoveMarkAll – Completely disables the recent Watchlist and History page changes that highlight updates to pages since your last visit.
- ReverseMarked – Lets you know which watchlist changes you've already checked by fading out viewed items.
- LagToMinutes – When "High database server lag" message shows up, this script displays the total days/hours/minutes/seconds of the lag, in addition to the default total seconds display.
- Watchlist mark - Bolds watched pages in Category and "User Contributions" listings. Also adds a "Show watchlist controls" link to enable watching and unwatching directly from these listings.
- Watchlist scout – Polls your watchlist when you open any wikipedia page, and then once a minute after that. When it discovers a new, unread page in your watchlist, creates a user-message informing you of the change, and stops polling. The message contains links to your watchlist, to the changed pages, and to their history page.
- Enhanced RC expander - Automatically expands watchlist/RecentChanges/RelatedChanges links in enhanced RC mode. Also adds a button to collapse all, similar to "Watchlist Links" above, which apparently isn't working currently.
History
- ActiveWatchers – Adds a link to History pages, next to the "Number of watchers" link, to show the number of active users watching the page ("active" defined as users who have logged in within the last 30 days).
- Convert from 24-hour – Changes times in user contributions and history pages to use 12-hour AM/PM clock.
Categories
- CatListMainTalkLinks – Adds a link to each page's associate Talk: or main page.
- Cat-A-Lot – extremely powerful category editing tool from Commons. Recently this tool learned how to work with regular articles, not just files. this is a wrapper that set the setting variable to enable non-file categorization, and loads the latest cat-a-lot from Commons.
Logs
- New Page Patroller – Adds another box to the sidebar that shows a regularly updated list of new pages
Contributions
- Hide Top Contribs – Does the opposite of the "Only show edits that are latest revisions" checkbox. (There is also an it.wikipedia.org-specific version, which has some "special" problems with some skins, but it still displays somewhere!)
- Convert from 24-hour – Changes times in user contributions and history pages to use 12-hour AM/PM clock.
Recent Changes
- AjaxRC - Automatically refreshes the Recent Changes every 60 seconds using Ajax.
- Enhanced RC expander - Automatically expands watchlist/RecentChanges/RelatedChanges links in enhanced RC mode. Also adds a button to collapse all, similar to "Watchlist Links" above, which apparently isn't working currently.
Todo lists
- Page Collector − Buttons to add a link to the current page to predefined "todo" list.
WikiProject-specific
- DYK Check – Tool for checking Did You Know eligibility.
- Update Child Lists – Adds a link to the toolbox that instructs a Taxobot to update the child list for a taxonomy template.
- Yet another Articles for creation helper script – Easily review Articles for creation article, redirect, and category submissions.
Meta-scripts
- User script sandbox – Allows you to carry out experiments with user JS and CSS code locally – that is, without saving it to your user JS/CSS page first. Does not work in Internet Explorer before version 8.
Non-Vector only
- Edit Count – Adds a quick link in the toolbar for checking one's edit count. (Especially for those who have editcountitis!)
- Contribs Tab – Adds a contributions tab on user and user talk pages.
- RC Patroller – Adds a porlet to the sidebar that shows a regularly updated list of recent changes
- EasyBlock – Adds a "block" tab to user pages, contribs pages, and diff pages. Comes with built-in block rationales and expiry times, as well as a "custom block" option. This script will not work if you are NOT an administrator.
- WhatLinksHere enhancement – Adds tabs to WhatLinksHere pages which allow a user to filter the list of links. Designed years ago with disambiguation in mind, and duplicates many features since added to the standard WLH page. Quick way to get counts of links by type.
Libraries
These functions can be included directly in a script but don't do anything unless called by some other code. The functions marked as deprecated have been rendered obsolete by new features added to MediaWiki, and only exist now as wrappers for compatibility with existing code.
(Template)
Documentation | Summary |
---|---|
Add LI menu | Allow "tabs" to be placed in drop-down menus (can be nested). Requires some CSS customisations |
warn.js | Gives a prompt to add any template (supposed to be used for warning vandals) |
Get user name | Gets the username corresponding to the current page |
MD5 2.2-alpha | Calculates the RSA Data Security, Inc. MD5 Message Digest of a string. Supports UTF-8 |
gui.htmlEdit | A WYSIWYG HTML editing control. See documentation |
edit.multiReplace | Class to simplify the replacement of several different regular expressions, each with its own substitution. See documentation |
morebits.js | A collection of wiki-related functions (such as editing via the API and displaying Twinkle-style windows), maintained as part of Twinkle (but usable separately) |
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) | |
VectorButtons | Give those boring gray standard buttons a Vector-like appearance | All |
Obsolete/non working scripts
- ^ Copy the following code, edit your user JavaScript, then paste:
{{subst:lusc|1=User:Lupin/popups.js}}
- ^ Copy the following code, edit your user JavaScript, then paste:
{{subst:lusc|1=User:Yair rand/ReferenceTooltips.js}}
- ^ Copy the following code, edit your user JavaScript, then paste:
{{subst:lusc|1=User:TheDJ/sharebox.js}}
- ^ Copy the following code, edit your user JavaScript, then paste:
{{subst:lusc|1=User:PleaseStand/hide-vector-sidebar.js}}
- ^ Copy the following code, edit your user JavaScript, then paste:
{{subst:lusc|1=User:Equazcion/SidebarTranslate.js}}
- ^ Copy the following code, edit your user JavaScript, then paste:
{{subst:lusc|1=User:Gary King/smaller templates.js}}
- ^ Copy the following code, edit your user JavaScript, then paste:
{{subst:lusc|1=User:Gary King/subjects age from year.js}}
- ^ Copy the following code, edit your user JavaScript, then paste:
{{subst:lusc|1=User:Bawolff/wiktLookup.js}}
- ^ Copy the following code, edit your user JavaScript, then paste:
{{subst:luss|1=User:Osarius/FloatingTOC.css}}
- ^ Copy the following code, edit your user JavaScript, then paste:
{{subst:lusc|1=User:Numbermaniac/goToTop.js}}
- ^ Copy the following code, edit your user JavaScript, then paste:
{{subst:lusc|1=User:Equazcion/Floater.js}}
- ^ Copy the following code, edit your user JavaScript, then paste:
{{subst:lusc|1=User:Writ Keeper/Scripts/SearchNamespace.js}}
- ^ Copy the following code, edit your user JavaScript, then paste:
{{subst:lusc|1=commons:MediaWiki talk:Gadget-search-new-tab.js}}
- ^ Copy the following code, edit your user JavaScript, then paste:
{{subst:lusc|1=commons:MediaWiki talk:Search-results-new-tab.js}}
- ^ Copy the following code, edit your user JavaScript, then paste:
{{subst:lusc|1=User:Writ Keeper/Scripts/googleTitle.js}}
- ^ Copy the following code, edit your user JavaScript, then paste:
{{subst:lusc|1=User:Anomie/linkclassifier.js}}
- ^ Copy the following code, edit your user JavaScript, then paste:
{{subst:lusc|1=User:Ucucha/duplinks.js}}
- ^ Copy the following code, edit your user JavaScript, then paste:
{{subst:lusc|1=User:Bility/copySectionLink.js}}
- ^ Copy the following code, edit your user JavaScript, then paste:
{{subst:lusc|1=User:Lenore/autolink.js}}
- ^ Copy the following code, edit your user JavaScript, then paste:
{{subst:lusc|1=User:Huji/Gadget-intropreload.js}}
- ^ Copy the following code, edit your user JavaScript, then paste:
{{subst:lusc|1=User:Gary King/nominations viewer.js}}
- ^ Copy the following code, edit your user JavaScript, then paste:
{{subst:lusc|1=User:Ais523/adminrights.js}}
- ^ Copy the following code, edit your user JavaScript, then paste:
{{subst:lusc|1=User:NuclearWarfare/Mark-blocked script.js}}
- ^ Copy the following code, edit your user JavaScript, then paste:
{{subst:lusc|1=User:Ais523/votesymbols.js}}
- ^ Copy the following code, edit your user JavaScript, then paste:
{{subst:lusc|1=User:PleaseStand/highlight-comments.js}}
- ^ Copy the following code, edit your user JavaScript, then paste:
{{subst:lusc|1=User:Writ Keeper/Scripts/deletionFinder.js}}
- ^ Copy the following code, edit your user JavaScript, then paste:
{{subst:lusc|1=User:Kephir/gadgets/unclutter.js}}