Wikipedia:User scripts
Appearance
This is a list of scripts for [[../|WikiProject User scripts]] See also [[../Techniques/|Techniques]] for a list of commonly used techniques.
Scripts can build upon each other, so helper functions, below, are a collection of scripts that can be used by other scripts. In some cases, specific helper functions are required by other scripts below. Remember to put the helper functions before the code that requires them.
Independent modules
(Template)
Name and link | Purpose | Required helper functions |
---|---|---|
Add edit section 0 | Add '0' tab to edit section of page before headings | |
Edit Top | Similar functionality to Add edit section 0, but button is [edit top] to the right of the page heading | |
Add purge to tabs | Add 'purge' tab to clear Wikipedia cache of page | addLink |
Changes since I last edited | Add 'since' tab to show changes since user last edited given page | Add LI link |
Show last diff | Add 'last' tab to show diff of last edit to this page | Add LI link Add tab |
External editor | Add a tab that will edit the current page with an external editor. | Add LI link Add tab |
User tabs | Adds tabs for edit count, page moves, contribs, and block logs when viewing user or user talk pages. | Add LI link Add tab |
Easy db | Adds tabs when viewing the article (not in the edit form) to tag an article for speedy deletion | Add LI link Add tab |
Quick wikify | Add 'wikify' tab on Edit pages to add {{wikify-date}} to top of page and save | Add LI link, Add tab |
CleanupTab.js | Add 'cleanup' tab on Edit pages to add {{cleanup-date}} to top of page and save | Add LI link, Add tab |
Duplicate tabs at bottom | Duplicate the tabs at the top on the bottom of the page | |
AutoAFD.js | Add 'AfD' tab to edit page to nominate an article for deletion | |
CloseAFD.js | Adds 'close' and 'relist' tabs to edit page of AfD debates to close/relist them. | addLink |
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) | |
Autocopyvio.js | Add 'copyvio' tab on Edit page to mark a page as a copyright violation and submit it to the Copyright problems page | |
Google link | Add toolbox links to search Google and Yahoo! for the title of the page. | addLink |
hideOwn.js | Hide your own edits by default in your watchlist | |
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 | Get Page Name |
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. | |
Wikipedia:Tools/Navigation popups | Navigation popups offer easy access to several Wikipedia functions in popups which appear when you hover the mouse over links | |
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. | |
godmode-light.js from Sam Hocevar | A rollback button on a user's contributions page and on an article’s latest diff page. | |
godmode-light variation | Modified for use with Wikipedia:Tools/Navigation popups. | |
Talk page section tabs | Replace link to empty talk-page by new section link | |
New message history | Append the new messages warning with a link to your talk page history | |
Force edit summary | Force user to make an edit summary if none is given (there is an option in the edit tab of Special:Preferences for the same purpose). | |
Force edit summary alternative | Flash summary box if no summary is given. | |
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. | Add LI link |
Sigdash | Change the Your signature with timestamp edit button to use a real em dash instead of two hyphens. | |
Fix diff width | Adds scroll bars to wide diffs (such as [1]). Fixes Bug 1229. Now works in IE too! | |
Unwatch | Adds unwatch links next to each item in your watchlist. | |
Replace | allows for regexp inline replacing in textboxes | addLink |
Time | Adds the current date and time (UTC) to the top right, after the "log out" link (or anywhere else up there) | |
Tag unverified image | Adds an {{unverified}} tag to an image when you press the tab. Could be modified to put any tag. | addLink |
Watchlist since | Adds a link to your watchlist which loads only new changes to watched items. | |
Autolink | Makes plaintext [[wikilinks]] and {{templates}} clickable (especially useful on monobook.js pages and the like). | |
Multi-NS search | Adds a drop-down menu to the search box to choose the namespace to search in. | |
Compare link | Makes the "compare selected versions" button on history pages into a link (allows diffs in new windows, tabs, etc.) | |
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. | |
Watchlist sorter | Alternative to Watchfilter. Doesn't filter edits, but rather sorts them by namespace. | |
Status switcher | A simple, but functional Wikipedia-status-switcher. | Add LI link |
Google search | Replace wikipedias search engine in the search box with a google sitesearch box. | |
Wikibreak Enforcer | Prevents user from logging in before a certain date+time, to enforce a wikibreak. | |
View source | Adds a [view source] button besides [edit this page]. | |
Formatter | Formats the article by removing excess whitespace and simplifying links. | addLink |
User:Voice of All/Useful | Several scripts there. Automatic WP:PP (de)listing/ history and user anaylsis/ admin script/ RC patrol script | Add tab |
RBL check | Adds an "RBL check" link to the toolbox on IP user/talk/contribs pages. | addLink |
Set Book Source | Rewrites ISBN links to the book source of your choice | |
AIV Helper | Adds [ipvandal] and [vandal] buttons when editing WP:AIV to facilitate listing vandals | Add LI link Add tab |
Signature contraction | Hides the code for complicated signatures in the edit window | |
Highlight your comments | A modified signature, user CSS and JavaScript to highlight your comments (or at least the last paragraphs of them). | |
WP cactions | Adds menus of page & user options to the cactions bar. Option to also replace standard history, watch, move, undelete etc. links | |
Comment localization | Changes the times in signatures to the local time. |
Meta-scripts
These are scripts that help develop or use other scripts.
Name and link | Purpose | Required helper functions |
---|---|---|
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. | |
Inclusion | Use these short commands to include scripts and css from other places (like synchronizing your accounts on all wikis). |
Helper functions
These functions can be included directly in a script but don't do anything unless called by some other code.
(Template)
Name and link | Purpose | Requires |
---|---|---|
Add LI link | Add a hyperlinked list-item as the last child of a given element | |
Add toolbox link | Add a link to the toolbox (on the left) | Add LI link |
Add tab | Add a tab to the page bar | Add LI link |
Add LI menu | Allow "tabs" to be placed in drop-down menus (can be nested) | Some CSS customisations |
Get Page Name | Get the title of the current page | |
Get tidy title | Gets the URL version of a page title | |
addLink | an extended (maybe improved) version of Add LI link | |
/warn.js | Gives a prompt to add any template (supposed to be used for warning vandals) |
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)
- WikiMiniAtlas adds draggable maps with clickable wikilinks to geocoded articles. Note that this is not GoogleMaps, but home-brew javascript. --Dschwen 12:18, 16 May 2006 (UTC)