$lsUrl = $this->getVar( 'wgServer' ) . $this->parent->getURL( array( 'localsettings' => 1 ) );
if ( isset( $_SERVER['HTTP_USER_AGENT'] ) &&
strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE' ) !== false ) {
- // JS appears the only method that works consistently with IE7+
- $this->addHtml( "\n<script>jQuery( document ).ready( function () { document.location = " .
+ // JS appears to be the only method that works consistently with IE7+
+ $this->addHtml( "\n<script>jQuery( function () { document.location = " .
Xml::encodeJsVar( $lsUrl ) . "; } );</script>\n" );
} else {
$this->parent->request->response()->header( "Refresh: 0;url=$lsUrl" );
* Javascript for module editWarning
*/
( function ( mw, $ ) {
- $( document ).ready( function () {
+ $( function () {
// Check if EditWarning is enabled and if we need it
if ( $( '#wpTextbox1' ).length === 0 ) {
return true;
// Explose API publicly
mw.toolbar = toolbar;
- $( document ).ready( function () {
+ $( function () {
var buttons, i, b, $iframe, editBox, scrollTop, $editForm;
// currentFocus is used to determine where to insert tags
} );
}
- $( document ).ready( function () {
+ $( function () {
// Do not enable on user .js/.css pages, as there's no sane way of "previewing"
// the scripts or styles without reloading the page.
if ( $( '#mw-userjsyoucanpreview' ).length || $( '#mw-usercssyoucanpreview' ).length ) {
/**
* JavaScript for History action
*/
-jQuery( document ).ready( function ( $ ) {
+jQuery( function ( $ ) {
var $historyCompareForm = $( '#mw-history-compare' ),
$historySubmitter,
$lis = $( '#pagehistory > li' );
// that didn't have patrolToken yet.
return;
}
- $( document ).ready( function () {
+ $( function () {
var $patrolLinks = $( '.patrollink a' );
$patrolLinks.on( 'click', function ( e ) {
var $spinner, href, rcid, apiRequest;
// Enqueued into domready from here instead of mediawiki.page.ready to ensure that it gets enqueued
// before other modules hook into document ready, so that mw.util.$content (defined by mw.util.init),
// is defined for them.
- $( document ).ready( mw.util.init );
+ $( mw.util.init );
}( mediaWiki, jQuery ) );
updateWatchLink: updateWatchLink
};
- $( document ).ready( function () {
+ $( function () {
var $links = $( '.mw-watchlink a, a.mw-watchlink, ' +
'#ca-watch a, #ca-unwatch a, #mw-unwatch-link1, ' +
'#mw-unwatch-link2, #mw-watch-link2, #mw-watch-link1' );
* JavaScript for Special:Block
*/
( function ( mw, $ ) {
- $( document ).ready( function () {
+ $( function () {
var $blockTarget = $( '#mw-bi-target' ),
$anonOnlyRow = $( '#mw-input-wpHardBlock' ).closest( 'tr' ),
$enableAutoblockRow = $( '#mw-input-wpAutoBlock' ).closest( 'tr' ),
}
}
- $( document ).ready( function () {
+ $( function () {
// Lame tip to let user know if its email is valid. See bug 22449.
// Only bind once for 'blur' so that the user can fill it in without errors;
// after that, look at every keypress for immediate feedback.
// When sending password by email, hide the password input fields.
// This function doesn't need to be loaded early by ResourceLoader, but is tiny.
- function hidePasswordOnEmail( $ ) {
+ function hidePasswordOnEmail() {
// Always required if checked, otherwise it depends, so we use the original
var $emailLabel = $( 'label[for="wpEmail"]' ),
originalText = $emailLabel.text(),
// Move the FancyCaptcha image into a more attractive container.
// This function does need to be run early by ResourceLoader.
- function adjustFancyCaptcha( $, mw ) {
+ function adjustFancyCaptcha() {
var $content = $( '#mw-content-text' ),
$submit = $content.find( '#wpCreateaccount' ),
tabIndex,
}
}
- $( document ).ready( function( $ ) {
- adjustFancyCaptcha( $, mw);
- hidePasswordOnEmail( $ );
+ $( function () {
+ adjustFancyCaptcha();
+ hidePasswordOnEmail();
} );
}( mediaWiki, jQuery ) );
/**
* JavaScript for Special:MovePage
*/
-jQuery( document ).ready( function ( $ ) {
+jQuery( function ( $ ) {
$( '#wpReason, #wpNewTitleMain' ).byteLimit();
} );
/**
* JavaScript for Special:Preferences
*/
-jQuery( document ).ready( function ( $ ) {
+jQuery( function ( $ ) {
var $preftoc, $preferences, $fieldsets, $legends,
hash,
$tzSelect, $tzTextbox, $localtimeHolder, servertime;
}
};
- $( document ).ready( rc.init );
+ $( rc.init );
mw.special.recentchanges = rc;
* JavaScript for Special:Search
*/
( function ( mw, $ ) {
- $( document ).ready( function () {
+ $( function () {
var $checkboxes, $headerLinks;
// Emulate HTML5 autofocus behavior in non HTML5 compliant browsers
/**
* JavaScript for Special:Undelete
*/
-jQuery( document ).ready( function ( $ ) {
+jQuery( function ( $ ) {
$( '#mw-undelete-invert' ).click( function ( e ) {
$( '#undelete input[type="checkbox"]' ).prop( 'checked', function ( i, val ) {
return !val;
/**
* Add a preview to the upload form
*/
- $( document ).ready( function () {
+ $( function () {
/**
* Is the FileAPI available with sufficient functionality?
*/
/**
* Disable all upload source fields except the selected one
*/
- $( document ).ready( function () {
+ $( function () {
var i, $row,
$rows = $( '.mw-htmlform-field-UploadSourceField' );
} );
}
- $( document ).ready( function() {
+ $( function () {
var $matrixTooltips = $( '.mw-htmlform-matrix .mw-htmlform-tooltip' );
if ( $matrixTooltips.length ) {
mw.loader.using( 'jquery.tipsy', function () {
* Add search suggestions to the search form.
*/
( function ( mw, $ ) {
- $( document ).ready( function ( $ ) {
+ $( function () {
var map, resultRenderCache, searchboxesSelectors,
// Region where the suggestions box will appear directly below
// (using the same width). Can be a container element or the input
( function ( $ ) {
- $( document ).ready( function () {
+ $( function () {
var $label, labelText;
function syncText() {
};
-$( document ).ready( uploadSetup );
+$( uploadSetup );
}( mediaWiki, jQuery ) );