$.each( $steps, function ( i, step ) {
var $step = $( step );
if ( $step.is( selector ) ) {
- if ($previous) {
+ if ( $previous ) {
$previous.addClass( 'tail' );
}
$step.addClass( 'head' );
// Store the context for next time
$( this ).data( 'expandableField-context', context );
} );
- return returnValue !== undefined ? returnValue : $(this);
+ return returnValue !== undefined ? returnValue : $( this );
};
}( jQuery ) );
match;
if ( typeof srcset === 'string' && srcset !== '' ) {
match = $.matchSrcSet( devicePixelRatio, srcset );
- if (match !== null ) {
+ if ( match !== null ) {
$img.attr( 'src', match );
}
}
- });
+ } );
}
return $target;
var util,
hasOwn = Object.prototype.hasOwnProperty,
- log = (window.console && window.console.log)
- ? function () { return window.console.log.apply(window.console, arguments); }
+ log = ( window.console && window.console.log )
+ ? function () { return window.console.log.apply( window.console, arguments ); }
: function () {};
// Simplified version of a few jQuery methods, except that they don't
// Restore warnings
mw.log.warn = warn;
warn = undefined;
- });
+ } );
QUnit.done( function () {
that.populateMissingTests();
var elItem = document.createElement( 'li' );
elItem.textContent = key;
elList.appendChild( elItem );
- });
+ } );
elFoot = document.createElement( 'p' );
elFoot.innerHTML = '<em>— CompletenessTest</em>';
util.each( style, function ( key, value ) {
elOutputWrapper.style[key] = value;
- });
+ } );
return elOutputWrapper;
}
if ( toolbar ) {
toolbar.insertBefore( testResults, toolbar.firstChild );
}
- });
+ } );
return this;
}
var ct = this;
util.each( ct.injectionTracker, function ( key ) {
ct.hasTest( key );
- });
+ } );
},
/**
*/
$.fn.firstTabIndex = function () {
var minTabIndex = null;
- $(this).find( '[tabindex]' ).each( function () {
- var tabIndex = parseInt( $(this).prop( 'tabindex' ), 10 );
+ $( this ).find( '[tabindex]' ).each( function () {
+ var tabIndex = parseInt( $( this ).prop( 'tabindex' ), 10 );
// In IE6/IE7 the above jQuery selector returns all elements,
// becuase it has a default value for tabIndex in IE6/IE7 of 0
// (rather than null/undefined). Therefore check "> 0" as well.
*/
$.fn.lastTabIndex = function () {
var maxTabIndex = null;
- $(this).find( '[tabindex]' ).each( function () {
- var tabIndex = parseInt( $(this).prop( 'tabindex' ), 10 );
+ $( this ).find( '[tabindex]' ).each( function () {
+ var tabIndex = parseInt( $( this ).prop( 'tabindex' ), 10 );
if ( tabIndex > 0 && !isNaN( tabIndex ) ) {
// Initial value
if ( maxTabIndex === null ) {
// as each header can span over multiple columns (using colspan=N),
// we have to bidirectionally map headers to their columns and columns to their headers
$tableHeaders.each( function ( headerIndex ) {
- $cell = $(this);
+ $cell = $( this );
columns = [];
for ( i = 0; i < this.colSpan; i++ ) {
headerIndex: headerIndex,
order: 0,
count: 0
- });
+ } );
if ( $cell.hasClass( config.unsortableClass ) ) {
$cell.data( 'sortDisabled', true );
s = config.sortList[j];
o = config.headerList[s[0]];
if ( isValueInArray( s[0], newSortList ) ) {
- $(o).data( 'count', s[1] + 1 );
+ $( o ).data( 'count', s[1] + 1 );
s[1] = $( o ).data( 'count' ) % 2;
}
}
newList = [];
$.each( response.parse.templates, function ( i, template ) {
li = $( '<li>' )
- .append( $('<a>')
+ .append( $( '<a>' )
.attr( {
'href': mw.util.getUrl( template['*'] ),
'class': ( template.exists !== undefined ? '' : 'new' )
// Run a function after the window onload event is fired
mw.log.deprecate( win, 'addOnloadHook', function ( hookFunct ) {
if ( onloadFuncts ) {
- onloadFuncts.push(hookFunct);
+ onloadFuncts.push( hookFunct );
} else {
// If func queue is gone the event has happened already,
// run immediately instead of queueing.
if ( media ) {
l.media = media;
}
- document.getElementsByTagName('head')[0].appendChild( l );
+ document.getElementsByTagName( 'head' )[0].appendChild( l );
return l;
};
normalizeExtension = function ( extension ) {
// Remove only trailing space (that is removed by MW anyway)
- extension = extension.toLowerCase().replace(/\s*$/, '');
+ extension = extension.toLowerCase().replace( /\s*$/, '' );
return extension;
};
var check = checkCssHandles;
pending++;
return function () {
- if (check) {
+ if ( check ) {
pending--;
check();
check = undefined; // Revoke
var compiledTemplate,
compilerName = this.getCompilerName( templateName );
- if (!compiledTemplates[moduleName]) {
+ if ( !compiledTemplates[moduleName] ) {
compiledTemplates[moduleName] = {};
}