Open main menu

UESPWiki β

UESPWiki:Javascript

< UESPWiki

This page lists all the available Javascript applets available for use on UESPWiki.

(Note: These pages are protected to prevent tampering. For experimental modifications, please save the applet in your User space. If you have an application that you would like to add, please ask an administrator to protect the page before listing it here.)

InstructionsEdit

To try out a Javascript applet for yourself, simply go to your javascript page and add mw.loader.load( '/w/index.php?title=UESPWiki:Javascript/Page.js&action=raw&ctype=text/javascript' ); on a new line. If the script also has a stylesheet (.css file), you have to add mw.loader.load( '/w/index.php?title=UESPWiki:Javascript/Page.css&action=raw&ctype=text/css', 'text/css' ); to your javascript page.

For example, if you want to use Add Purge and Reorder Categories, your Common.js file would look like this:

mw.loader.load( '/w/index.php?title=UESPWiki:Javascript/addpurge.js&action=raw&ctype=text/javascript' );
mw.loader.load( '/w/index.php?title=UESPWiki:Javascript/reorderCategories.js&action=raw&ctype=text/javascript' );
mw.loader.load( '/w/index.php?title=UESPWiki:Javascript/reorderCategories.css&action=raw&ctype=text/css', 'text/css' );

An extensive "how to" description, intended for Wikipedia use but quite usable at UESPWiki, can be found here. Conversion information for older code can be found here.

Listing of Javascript AppletsEdit

In the table below, you will find the UESPWiki Page to link to in your Common.js file as well as the Home Page of the original script. Please note that modifications may have been made to the script to get it to work on UESPWiki — please do not update a script from its home site without confirming that it works here!

Some scripts are also available from the Gadgets tab of your Preferences link.

Name Gadget UESPWiki Page(s) Home Page Description
Add Purge Yes addpurge.js Wikipedia Add 'purge' tab to clear Wikipedia cache of page.
(Note: Similar functionality is also available by adding the UTC Clock Gadget and clicking on the clock.)
ajaxRC Yes ajaxRC.js Wikipedia Add a check box to RecentChanges to allow an automatic refresh every 60 seconds.
Changes since I last edited addsince.js Wikipedia Add 'since' tab to show changes since user last edited given page.
Clean Diff URLs Yes clean diff urls.js Wikipedia Convert long diff URLs to shorter links using [[Special:Diff/ to allow easier linking
Comments in local time Yes comments in local time.js Wikipedia Change UTC-based times and dates, such as those used in signatures, to be relative to local time.
Edit Top Yes editsection0.js MediaWiki Add an [edit] link for the lead section of a page.
Force Preview before saving forcepreview.js Wikipedia User X! Disable the "save" button until you preview, forcing a preview to be made.
(Note: IE users can still bypass the forced preview by hitting Enter in the Edit Summary; most browsers will not allow this.)
Modify Sidebar modifysidebar.js UESP User Gez Add or remove items from the links at the left of the page. Note: importing this script does not work in Chrome and Safari, but you can copy the code to your javascript page instead.
Rename Search Buttons renameSearchButtons.js UESP User rpeh Makes the labels of the search buttons smaller so they all fit on one line
Reorder Categories reorderCategories.js
reorderCategories.css
UESP User rpeh Trims the initial namespace from categories, sorts them alphabetically and puts them in a table. See this image for an example.
Searches in New Window Yes searchesInNewWindow.js‎ UESP User rpeh Launches a new window or tab each time you search, rather than loading results in the current window.
Subpages Yes subpages.js mediawiki.org Add a link listing the subpages of the current page to the toolbox.
Watchlist Notifier watchlistnotifier.js Wikipedia User Ais523 Places a message at the top of the screen whenever your watchlist has changed since you last looked at it.
wikEd Yes wikEd.js Wikipedia An alternative full-featured integrated text editor.
wikEdDiff Yes wikEdDiff.js Wikipedia Improved diff view between article versions (not needed if wikEd is used)