ResourceLoader/Core modules

This page intends to list, document, explain and give examples for all the libraries, plugins and scripts present in MediaWiki's resources by default. = jQuery & plugins = jQuery 1.4.2 is loaded. For more information about jQuery in general and all it's core functions, refer to http://api.jquery.com/

jQuery UI
jQuery UI 1.8.2: http://jqueryui.com/demos/ The following components are included:
 * jquery.ui.accordion.js
 * jquery.ui.autocomplete.js
 * jquery.ui.button.js
 * jquery.ui.core.js
 * jquery.ui.datepicker.js
 * jquery.ui.dialog.js
 * jquery.ui.draggable.js
 * jquery.ui.droppable.js
 * jquery.ui.mouse.js
 * jquery.ui.position.js
 * jquery.ui.progressbar.js
 * jquery.ui.resizable.js
 * jquery.ui.selectable.js
 * jquery.ui.slider.js
 * jquery.ui.sortable.js
 * jquery.ui.tabs.js
 * jquery.ui.widget.js
 * i18n

jQuery.checkboxShiftClick
This single-function plugin can be called to add this functionality to any number of checkboxes. By default (onload) it's applied to all  elements that have a type of checkbox, excluding any with a class of 'noshiftselect'. As it has a built-in prevention to avoid binding the CheckboxShiftClick twice to the same element you can simply run the line below under "Default" again at any time if you want to enable dynamically added checkboxes in the page to be shift-selectable as well. Or alternatively run it on the specific selector of choise (see second example below).

jQuery.client
A plugin that extract information about the client's browser, layout engine and operating system.

Profile
The profile function is the main function here and returns (and caches) all the information in an object in. All possible values (except for version numbers) are predefined. A typical return looks like this:

Here a few examples Check jquery.client.js for possible values of browser names, layout engines and platforms.

Test
TODO

jQuery.placeholder
This plugin adds support for placeholder texts in input fields for browsers that don't support the HTML5 attribute yet. If the attribute is not supported it's applied to all input elements with a 'placeholder' attribute, on-load.

It has a built-in check for browser support, but for effeciency it's best to do this check (also) wrapped around to call.

jQuery.tipsy
= MediaWiki =

mediaWiki.loader
mediaWiki.loader.load can be called with an external script or style URI beginning with either "http://" or "https://" and a mime-type, either "text/css" or "text/javascript". If no mime-type is provided, "text/javascript" is assumed.

mediaWiki.html
TODO

addPortletLink
This function is ported from the legacy wikibits keeping it fully backwards compatible, with a few adjustments and with added support for a CSS-selector as.

$content
A jQuery object for a page's content body regardless of the skin used.

getParamValue
This function returns the value for a parameter passed in a URL address.

isEmpty
This function checks if a variable is empty. Works with all variable types.

rawurlencode
This function returns an encoded string in its raw form for use in urls.

wikiUrlencode
This function returns an article/page name in its encoded form.

wikiGetlink
This function returns the full website address of a local wiki page.