Wikipedia:WikiProject User scripts/Scripts

From Wikipedia, the free encyclopedia

Shortcuts:
WP:JS
WP:US/S

Contents

This is a list of scripts for WikiProject User scripts.

[edit] Installing

Logged-in users can install scripts by modifying a personal userscripts subpage.

  • If you use default Monobook skin, this special link "your monobook.js" points to this subpage.
  • If you set some other skin in your Preferences, see Wikipedia:Skin for corresponding subpage name.
    Note that many scripts are designed with Monobook skin in mind. Such scripts should also work in Chick, Simple and Myskin, and are less likely to work in Classic, Nostalgia and Cologne Blue. If you use Modern skin, try enabling a special "compatibility" gadget in your preferences.

Remember that you need to bypass your cache after installation.

[edit] Copying

One way to install a script is to simply copy the whole script code into your monobook.js. You will thereafter have your own copy of the script, which will not be updated automatically; you must do it yourself.

[edit] Importing

Importing is a preferred and most popular way to install a userscript. It makes your monobook.js more readable and automatically keeps you up to date with script updates and fixes.

This is done by adding importScript('full_page_name') to your monobook.js.

For example, to install Watchlist since script, you add the following line to your monobook.js:

importScript('Wikipedia:WikiProject User scripts/Scripts/Watchlist since');

Not all scripts are subpages of WikiProject User scripts; many scripts are stored in the userspace of the user who maintains them; check the destination of the links in the list below to see where a script is stored, and use that location as the argument to the importScript function.

Note that importing requires the script to have its own page which is entirely valid Javascript (all explanatory text is /* inside comments */), as most scripts do. If you import a file which is not valid Javascript, nothing serious is likely to happen, but your Javascript, and any Javascript you have below that, will not work. If your browser is set to inform you about Javascript errors, you will see these errors; otherwise you will see nothing except that the scripts you have tried to add do not work.

Last note: if you see "&dontcountme=s" in a userscript URL then this part can be removed. It is no longer needed.

[edit] Gadgets

Some userscripts are made into gadgets, you can install them simply by selecting a checkbox in your Preferences.

[edit] Scripts

Script Summary

[edit] Editing

wikEd A full-featured in-browser text editor for Wikipedia edit pages. Works in Firefox/Mozilla only. Provides wikicode syntax highlighting, regular expression search and replace, MS Word and HTML to wikicode conversion, server-independent Show preview and Show changes, fullscreen editing mode, and single-click fixing of common mistakes
QuickEdit Inline editing of sections in articles (see de:Image:QuickEdit.png)
Inline section editor Inline section editor – also supports previewing and viewing changes inline
Replace allows for regexp inline replacing in textboxes
edit.regexReplace Selectively replace regex matches, possibly based on the text of the match. (documentation)
edit.autoReplace Make a standard, configurable set of regular expression based replacements each time you start editing a page, using the interface of regexReplace. (documentation)
qPreview Quick AJAX preview without reloading the whole page
Quick Preview Adds button Quick preview to the edit form. Clicking it will do an AJAX call to update/show the preview. Much faster then regular preview, which requires reloading the whole page, also does not change the cursor position in the edit window, making it easier to continue editing. Unlike InstaView templates, images etc are rendered correctly, also the script is much "lighter" then InstaView. (documentation)
Bracket matcher Adds a 'parse' link that shows a copy of the edit box with matched curly braces higlighted, for help in tracing complex nested expressions

[edit] Content editing

Advisor When editing an article, suggests fixing common issues with wikitext as you type.
iwiki Shows interwikis either as English names or actual links.
Helps synchronize interwikis with other projects.
Formatter Formats the article by removing excess whitespace and simplifying links
defaultsort Edits the category links to make use of the new {{DEFAULTSORT:sortkey}} keyword
LinkFixr Adds a link to the toolbox in edit mode to fix "link typos", e.g., [[Stuff,]] => [[Stuff]],
BR fixer Fixes all BR's to proper XHTML form on a page.

[edit] Buttons/links

XEB Allows the user to change the buttons on the top of the edit panel
refbuttons Adds buttons to the edit toolbar for common citation templates.

[edit] Reminders/signatures

Force edit summary Force user to make an edit summary (just like an option preferences:Editing, but without leaving the page)
Force summary alt Flash summary box if no summary is given.
qSig Smart signature button next to «Save page» button — reminds you when to sign
sign Automatic signing — reminds you when to sign
Sigdash Change the Your signature with timestamp edit button to use a real em dash instead of two hyphens
Force Preview before saving Disable the "save" button until you preview, forcing a preview to be made.

[edit] AJAX Tools

Navigation popups Navigation popups offer easy access to several Wikipedia functions in popups which appear when you hover the mouse over links
User watchlist Watch the contributions of specified users
Watchlist notifier Places a message at the top of the screen whenever your watchlist has changed since you last looked at it
New Page Patroller Adds another box to the sidebar that shows a regularly updated list of new pages
RC Patroller Adds another box to the sidebar that shows a regularly updated list of recent changes
Category watchlist Enhances the watchlist to show the addition of pages to specified categories; incompatible with Enhanced Recent Changes in preferences
HighlightRedirects Recolors all links green that are pointing to redirect pages
What links here WL What links here watchlist: see the backlinks for multiple pages
user:js/diffs Diffs are opened as popups windows

[edit] Page appearance

Set Book Source Rewrites ISBN links to the book source of your choice
Sidebar translator Translates the 'in other languages' box on the sidebar to English
Selfrefs as a tab Changes selfref disambiguation headers to a tab marked 'wp'
Autolink Makes plaintext [[wikilinks]] and {{templates}} clickable (especially useful on monobook.js pages and the like)
Strike blocked Strikes out links to personal pages of blocked users (documentation)

[edit] Menus

bottomSidebar Moves Sidebar to the bottom, making content area 100% wide. One click on the left edge brings Sidebar back on the left. For Monobook skin.
hidePane Replaces Sidebar and top portlets with pulldown menus on the top, making content area 100% wide. For Monobook skin.
Compact Navigation Replaces p-cactions tabs ("article", discussion", "edit",...) with a set of pulldown menus, providing some extra links. Firefox only.
Tabs at bottom Duplicate the tabs at the top on the bottom of the page

[edit] Discussions

!Vote symbols Add symbols to !votes in discussions
Username highlighter Highlights all occurences of your username on pages (even in edit boxes!)
Username highlighter 2 Highlights all occurences of your username on pages (a modified version that avoids edit pages; the above version causes errors in some browsers)
Admin highlighter Highlights all links to the user/user talk pages of admins in cyan. (Note: the list of admins is hard-coded and therefore might get out-of-date at times. Doesn't work properly in Internet Explorer. Please import rather than copying the code, as otherwise I can't update the list of admins.)
Your comments A modified signature, user CSS and JavaScript to highlight your comments (or at least the last paragraphs of them)
Comment localization Changes the times in signatures to the local time
Signature contraction Hides the code for complicated signatures in the edit window
Hide talk page templates Places all yellow messagebox templates from the lead section of a talk page into a collapsed table. (May not work properly in Internet Explorer; has not been tested in all browsers.)

[edit] Watchlist

Watchlist since Adds a link to your watchlist which loads only new changes to watched items
WL: new changes, unwatch, sort Same as above, plus instant Ajax unwatch and the ability to sort entries by namespace
Cacycle watchlistSorter Sorts and color-codes entries by namespace. Keeps a Most recent section on top. Not compatible with "Enhanced Recent Changes" option. Also runs under Greasemonkey and as a gadget.
All diffs above here Add 'adah' links next to each watchlist entry which opens all diffs from that shown in the watchlist in separate windows

[edit] Recent Changes

Format Recent Changes Reformats Recentchanges to a formatted table; not compatible with "Enhanced recent changes" option

[edit] What links here

WhatLinksHere.js Add selection tabs to WhatLinksHere pages

[edit] Diffs

wikEdDiff Improved and easier to read diff view for comparing article versions. Doesn't work in Opera
Single column diffs Makes the diff page appear as a single column. Doesn't work in IE and Opera
Gerbrant.edit.linksInDiff Makes internal links in the side-by-side comparisons (diffs) clickable. Exports nothing
user:js/diffs Diffs popups, multiple improvements to diffs, plus all the features mentioned above

[edit] History

histComb Improves readability of history pages: combines consequent edits, etc.
Compare link Makes the "compare selected versions" button on history pages into a link (allows diffs in new windows, tabs, etc.)

[edit] Logs

logPage Converts Special:Log into a nice easy to read table
user:js/patroller Script for patrollers: Newpages as a table, direct patrol links, extra patrol tab on new pages, plus other features
Patrol links Adds patrol links directly on Newpages for easy patrolling of obvious good pages.

[edit] Contributions

Color-coded contribs Color-codes contributions pages based on whether you have the top contribution
Hide top contributions Adds a tab to Special:Contributions to hide pages on which you have the top edit

[edit] Deletion and other processes

Easy db Adds tabs when viewing the article (not in the edit form) to tag an article for speedy deletion
Easy prod Add tab for proposing pages for deletion when viewing articles and user pages
AutoAFD.js Adds 'AfD' tab to edit page to nominate an article for deletion
CloseAFD Adds 'close' and 'relist' tabs to edit page of AfD debates to close/relist them
afd helper Adds 'vote' links to all edit-AFD-page links which make voting on an AFD a one-click process; also AFD-nomination feature like AutoAFD (link in toolbox on left when viewing page, not editing)
afc helper Enables users to do one-click declines on Articles for Creation pages for common types of submitted articles (Based on AFD helper)
Autocopyvio.js Add 'copyvio' tab on Edit page to mark a page as a copyright violation and submit it to the Copyright problems page
AIV Helper Adds [ipvandal] and [vandal] buttons when editing WP:AIV to facilitate listing vandals
CommonsHelper Helper Expedites the process of moving free images to the Commons with CommonsHelper and tagging them for deletion with {{NowCommons}}
MotD closure script Adds a tab for closing a MotD nomination. Must be done section-by-section.
delsort.js Adds a tab to perform deletion sorting.
AFDsort Adds a "Sort" button when editing an AFD debate, used to sort existing AFD debates into categories per CAT:AFD.
hide closed AFDs Adds an option to hide closed AFD debates when viewing the log pages using a tab button, useful for admins closing debates.
SimpleVote Adds an option to easily vote on AFDs—uses morebits.js. Not to be used in conjunction with AFD Helper.

[edit] Tagging

TWINKLE Multifunctional tool assiting in a lot of common Wikipedia maintenance tasks. Does not work with IE.
Friendly Script adds a tab on articles for robust tagging functionality as well as a tab on user talk pages for robust welcoming functionality. Also provides welcoming functionality from diff views for users with a blank talk page. Integrated with and built using the same library as Twinkle.
Quick wikify Add 'wikify' tab on Edit pages to add {{wikify}} to top of page and save
Unreferenced tool Add 'unref' tab on Edit pages to add {{unreferenced}} to top of page and save
CleanupTab.js Add 'cleanup' tab on Edit pages to add {{cleanup}} to top of page and save
test-n.js Add tabs that automate the adding of {{test-n}} templates when editing user talk pages
test-enhanced Enhanced version of the above
Tag unverified image Adds an {{unverified}} tag to an image when you press the tab. Could be modified to put any tag
Revert tools Adds links to the top of diff pages to revert the edit and/or warn the user
quickimgdelete Script to simplify IFD nominations and marking images as no source/license/rationale or orphaned/replaceable fair use
welcome new user Script that adds a welcome template to a new user's talk page
Welcome user Tool to welcome new users when editing page.
Tags Script adds various frequently used maintenance templates (e.g. cleanup, wikify, etc.) at the top of articles. Doesn't work in IE
Flexitags A customizable version of Tags. Doesn't work in IE
Stub tag tab Adds a tab to mark articles as stubs, pulling lists of available stub types from the lists at Wikipedia:WikiProject Stub sorting
FastButtons Adds small buttons below the page header for quick tagging pages for deletion, maintenance, etc.

[edit] Links/shortcuts

Add purge to tabs Add 'purge' tab to clear Wikipedia cache of page
Changes since I last edited Add 'since' tab to show changes since user last edited given page
Show last diff Add 'last' tab to show diff of last edit to this page
External editor Add a tab that will edit the current page with an external editor
User tabs Adds tabs for edit count, page moves, contribs, and block logs when viewing user or user talk pages
User Contribs Tabs Shows contribs, edit count & edit summary usage when viewing user or user talk pages
Six tabs Adds edit and history tabs for the other page:

Article edit hist   Discussion edit hist

Navigation shortcuts Navigation shortcuts offer adding personal links into the left sidebar menu, below the navigation, search and toolbox portlets
godmode-light.js From Sam Hocevar: a rollback button on a user's contributions page and on an article’s latest diff page
Logs link Add a 'Logs' link to the toolbox, which links to Special:Log for that page. If the page is a user page, user talk page or a user subpage, the link goes to logs for that user
View source Adds a [view source] button to the left of [edit this page]
RBL check Adds an "RBL check" link to the toolbox on IP user/talk/contribs pages (already exists in Sp-contributions-footer-anon)
WP cactions Adds menus of page & user options to the cactions bar. Option to also replace standard history, watch, move, undelete etc. links
EcceNux/replylinks.js Adds reply links near user links, automatically inserts a backtrack link (with section anchor) to the message area
stubtagtab.js Adds a 'stub' tab for easy application of {{stub}} and more specific stub templates
New message history Append the new messages warning with a link to your talk page history
HistoryCount Change the default amount of history entries on the history tab
Translate external links Adds links to machine translation sites that will automatically translate external links tagged with Language icons.

[edit] Navigating to Edit page

Add edit section 0 Adds 0 tab to edit the top section of the page
Simplified edit section 0 Adds 0 tab as above; simplified version, works better on Safari 3
Edit Top Adds [edit] link below the page heading to edit the top section of the page
Gerbrant.edit.top Similar to Edit Top, but as an includable module
Universal EditTop Most universal Edit Top, also works for other projects and languages; also a gadget
Fiddle Edit Tab Randall Bart's Fiddle Edit Tab: Modifies "edit this page" tab
Talk page section tabs Replace link to empty talk-page by new section link
HighlightEditSections Highlights section of the page when hovering over section edit link
Same-page edit Adds edit functionality from same page on double-click of article

[edit] Searching

Google search Changes the wikipedia search box into a google wikipedia domain search. Also has a Feelin' lucky button
Google link Add toolbox links to search Google and Yahoo! for the title of the page
Search links Add toolbox links to search Google web, news archive, books and scholar for the title of the page
Multi-NS search Adds a drop-down menu to the search box to choose the namespace to search in
Google search Show a google sitesearch box instead of, or beside, the wikipedia search
Google search Adds a google sitesearch box below the Wikipedia search box.
searchList Drop-down list for namespace search, ability to open search in a new window, shortcuts for namespaces names
EasySearch Script that adds extra buttons to search in Wikinews, Wiktionary, Commons, Spanish, German, and French Wikipedia.

[edit] Administrative

ubergodmode.js From Sam Hocevar: a compilation of Javascript helpers that help with the administration of Wikipedia. You need to be already a sysop for it to be useful
Article assessment Allows talk-page project templates to be added or modified from the article page via drop-downs, and displays an article's project assessments. FAC/GAC/FFA indicators
Protection js Page protection (and related functions) script. See its page for details
rollbackSummary Adds a tab that allows you to alter the edit summary for rollback links on a page.

[edit] Personal

Status switcher A simple, but functional Wikipedia-status-switcher
Wikibreak Enforcer Prevents user from logging in before a certain date+time, to enforce a wikibreak
Edit count tab Adds a tab to pages which, when clicked, will display the any user's edits per the Wannabe_Kate tool
Live edit counter Add a userbox with an always updated edit counter
Time Adds the current date and time (UTC) to the top right, after the "log out" link (or anywhere else up there)

[edit] Miscellaneous

VoA/Useful Several scripts there. Automatic WP:PP (de)listing/ history and user anaylsis/ admin script/ RC patrol script. Needs Add tab
A collection A bunch of different scripts. (they are listed there because it is easier to update, as they change a lot)
Wikipedia Bilingual Display a Wikipedia article in 2 of the languages in which it is available, side by side (for example, Russian and Spanish)
Remove Access Keys Script to disable all or some access keys on Wikipedia pages
last.fm widget If you like music
scriptpackage.js A collection of many of the scripts on this page, conveniently put together in one package. Includes Twinkle, wikEd, popups, and lots of other useful scripts. Good for installing many editing/anti-vandalism tools all at once.
Hodgepodge Wikidudeman's Hodgepodge of numerous user scripts including customized page tagging, AFD helpers, Speedy tagging, Twinkle, User warnings, Vandalism fighting, Popups, Image tagging, Etc.
RenderBoard Script created to generate the appropriate template needed for rendering game boards. Currently used for chess and its variants, but expanding to more games. Please contact Matthew Yeager if you would like this to include a certain game or if you have any questions.
ContribsTab Script that adds a "Contributions" tab when viewing a user or user talk page, or any subpage thereof. Clicking the tab brings up the user contribution page.
gWatch tab Link's to gWatch.

[edit] Meta-scripts

These are scripts that help develop or use other scripts.

automod Edits and saves a given article according to parameters passed in the URL.
Gerbrant.mng.decache Selectively remove one or more user scripts from your browser cache. Needs external application. (documentation)
Inclusion Use these short commands to include scripts and css from other places (like synchronizing your accounts on all wikis)
noie.js This short piece of code allows you to disable certain scripts in Internet Explorer only. Used to prevent script errors with non-IE compatible scripts.
Syntax highlighter Meta-script highlights anything that looks like css code inside pre tags by giving a class to each bit. Makes it much easier to read. Use your monobook.css to format your monobook.css.  :-) Now for js code it's also available

[edit] 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 functions/code mostly used by TW

[edit] 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 copied and pasted to your monobook.css if you do not wish to recieve updates to the code when it is improved.

Name and link Purpose Compatible Skins
nonewmessages Remove the "You have new messages" bar. Monobook; others unconfirmed
externals Replaces the external link icon with the corresponding favicon (works for some links)

[edit] Incomplete things

  • Show recent comments
  • meta:Help:User style/floating quickbar could be made into a self-contained script. Might be slower that way, though. — Omegatron 21:29, 4 February 2006 (UTC)
    • Not necessarily; you could simply put the scrollbars on the content area instead of on the whole window. The real problem is that often you have to scroll down to see the rest of the the left pane. So it would need it's own scrollbar or a similar solution. Shinobu 13:07, 27 December 2006 (UTC)

[edit] Obsolete/not working scripts

Script Summary Note
Unwatch Adds unwatch links next to each item in your watchlist Doesn't work due to Mediawiki changes
Watchfilter Lets you filter your watchlist by namespace, similar to recent changes. Please note that namespace filtering has just been added to watchlist, rendering this slightly less useful Doesn't work due to changed watchlist page design
Watchlist export/import Allows copying of watchlists between accounts, and exporting a watchlist to public view / importing such an exported watchlist. (Doesn't work in Internet Explorer) This feature is now part of the software
Autowatch Changes the watch tab to allow you to watch and unwatch an article in-place, without going to the confirmation screen This feature is now part of the software
Fix lowercase first letter problem When a page has the lowercase template, changes the page to show the correct title and removes the template Obsolete: this is now a MediaWiki feature.
Fix diff width Adds scroll bars to wide diffs (such as [1]). Obsolete: bugzilla:1229 is fixed
hideOwn.js Hide your own edits by default in your watchlist Obsolete: option in Preferences or link in watchlist do the same thing
CSD AutoReason Adds a drop-down box of the CSD criteria to the page deletion screen (admins only) Obsolete due to MediaWiki:Deletereason-dropdown

Obsolete libraries:

Documentation Summary
Add LI link (mostly deprecated) Add a hyperlinked list-item as the last child of a given element
Add toolbox link (deprecated) Add a link to the toolbox (on the left)
Add tab (deprecated) Add a tab to the page bar
Get Page Name (deprecated) Get the title of the current page
Get tidy title (deprecated) Gets the URL version of a page title
addLink (deprecated) an extended (maybe improved) version of Add LI link