jenkins-bot has submitted this change and it was merged.
Change subject: Apply coding conventions for JavaScript
......................................................................
Apply coding conventions for JavaScript
Change-Id: I1ab432ec54e82b05b7c096baa5d4e56dce11aaa9
---
M resources/src/jquery/jquery.arrowSteps.js
M resources/src/jquery/jquery.expandableField.js
M resources/src/jquery/jquery.hidpi.js
M resources/src/jquery/jquery.qunit.completenessTest.js
M resources/src/jquery/jquery.tabIndex.js
M resources/src/jquery/jquery.tablesorter.js
M resources/src/mediawiki.action/mediawiki.action.edit.preview.js
M resources/src/mediawiki.legacy/wikibits.js
M resources/src/mediawiki/mediawiki.Title.js
M resources/src/mediawiki/mediawiki.js
M resources/src/mediawiki/mediawiki.template.js
11 files changed, 24 insertions(+), 24 deletions(-)
Approvals:
Bartosz Dziewoński: Looks good to me, approved
jenkins-bot: Verified
diff --git a/resources/src/jquery/jquery.arrowSteps.js
b/resources/src/jquery/jquery.arrowSteps.js
index f8641e1..629ce32 100644
--- a/resources/src/jquery/jquery.arrowSteps.js
+++ b/resources/src/jquery/jquery.arrowSteps.js
@@ -80,7 +80,7 @@
$.each( $steps, function ( i, step ) {
var $step = $( step );
if ( $step.is( selector ) ) {
- if ($previous) {
+ if ( $previous ) {
$previous.addClass( 'tail' );
}
$step.addClass( 'head' );
diff --git a/resources/src/jquery/jquery.expandableField.js
b/resources/src/jquery/jquery.expandableField.js
index 732cc6e..48341bc 100644
--- a/resources/src/jquery/jquery.expandableField.js
+++ b/resources/src/jquery/jquery.expandableField.js
@@ -134,7 +134,7 @@
// Store the context for next time
$( this ).data( 'expandableField-context', context );
} );
- return returnValue !== undefined ? returnValue : $(this);
+ return returnValue !== undefined ? returnValue : $( this );
};
}( jQuery ) );
diff --git a/resources/src/jquery/jquery.hidpi.js
b/resources/src/jquery/jquery.hidpi.js
index 4ecfeb8..8fca056 100644
--- a/resources/src/jquery/jquery.hidpi.js
+++ b/resources/src/jquery/jquery.hidpi.js
@@ -73,11 +73,11 @@
match;
if ( typeof srcset === 'string' && srcset !== '' ) {
match = $.matchSrcSet( devicePixelRatio, srcset
);
- if (match !== null ) {
+ if ( match !== null ) {
$img.attr( 'src', match );
}
}
- });
+ } );
}
return $target;
diff --git a/resources/src/jquery/jquery.qunit.completenessTest.js
b/resources/src/jquery/jquery.qunit.completenessTest.js
index 8d38401..556bf8c 100644
--- a/resources/src/jquery/jquery.qunit.completenessTest.js
+++ b/resources/src/jquery/jquery.qunit.completenessTest.js
@@ -17,8 +17,8 @@
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
@@ -91,7 +91,7 @@
// Restore warnings
mw.log.warn = warn;
warn = undefined;
- });
+ } );
QUnit.done( function () {
that.populateMissingTests();
@@ -114,7 +114,7 @@
var elItem = document.createElement(
'li' );
elItem.textContent = key;
elList.appendChild( elItem );
- });
+ } );
elFoot = document.createElement( 'p' );
elFoot.innerHTML = '<em>—
CompletenessTest</em>';
@@ -133,7 +133,7 @@
util.each( style, function ( key, value ) {
elOutputWrapper.style[key] = value;
- });
+ } );
return elOutputWrapper;
}
@@ -171,7 +171,7 @@
if ( toolbar ) {
toolbar.insertBefore( testResults,
toolbar.firstChild );
}
- });
+ } );
return this;
}
@@ -248,7 +248,7 @@
var ct = this;
util.each( ct.injectionTracker, function ( key ) {
ct.hasTest( key );
- });
+ } );
},
/**
diff --git a/resources/src/jquery/jquery.tabIndex.js
b/resources/src/jquery/jquery.tabIndex.js
index 46cc8f2..ed37aa1 100644
--- a/resources/src/jquery/jquery.tabIndex.js
+++ b/resources/src/jquery/jquery.tabIndex.js
@@ -10,8 +10,8 @@
*/
$.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.
@@ -35,8 +35,8 @@
*/
$.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 ) {
diff --git a/resources/src/jquery/jquery.tablesorter.js
b/resources/src/jquery/jquery.tablesorter.js
index f3f2655..0d3341b 100644
--- a/resources/src/jquery/jquery.tablesorter.js
+++ b/resources/src/jquery/jquery.tablesorter.js
@@ -339,7 +339,7 @@
// 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++ ) {
@@ -354,7 +354,7 @@
headerIndex: headerIndex,
order: 0,
count: 0
- });
+ } );
if ( $cell.hasClass( config.unsortableClass ) ) {
$cell.data( 'sortDisabled', true );
@@ -870,7 +870,7 @@
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;
}
}
diff --git a/resources/src/mediawiki.action/mediawiki.action.edit.preview.js
b/resources/src/mediawiki.action/mediawiki.action.edit.preview.js
index e4f4249..42ba5aa 100644
--- a/resources/src/mediawiki.action/mediawiki.action.edit.preview.js
+++ b/resources/src/mediawiki.action/mediawiki.action.edit.preview.js
@@ -125,7 +125,7 @@
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' )
diff --git a/resources/src/mediawiki.legacy/wikibits.js
b/resources/src/mediawiki.legacy/wikibits.js
index a403996..dc21472 100644
--- a/resources/src/mediawiki.legacy/wikibits.js
+++ b/resources/src/mediawiki.legacy/wikibits.js
@@ -60,7 +60,7 @@
// 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.
@@ -197,7 +197,7 @@
if ( media ) {
l.media = media;
}
- document.getElementsByTagName('head')[0].appendChild( l );
+ document.getElementsByTagName( 'head' )[0].appendChild( l );
return l;
};
diff --git a/resources/src/mediawiki/mediawiki.Title.js
b/resources/src/mediawiki/mediawiki.Title.js
index 7ced42f..1e80cd7 100644
--- a/resources/src/mediawiki/mediawiki.Title.js
+++ b/resources/src/mediawiki/mediawiki.Title.js
@@ -508,7 +508,7 @@
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;
};
diff --git a/resources/src/mediawiki/mediawiki.js
b/resources/src/mediawiki/mediawiki.js
index c8f5506..8153fe3 100644
--- a/resources/src/mediawiki/mediawiki.js
+++ b/resources/src/mediawiki/mediawiki.js
@@ -1199,7 +1199,7 @@
var check =
checkCssHandles;
pending++;
return function () {
- if (check) {
+ if ( check ) {
pending--;
check();
check =
undefined; // Revoke
diff --git a/resources/src/mediawiki/mediawiki.template.js
b/resources/src/mediawiki/mediawiki.template.js
index 79f43d1..61bbb0d 100644
--- a/resources/src/mediawiki/mediawiki.template.js
+++ b/resources/src/mediawiki/mediawiki.template.js
@@ -63,7 +63,7 @@
var compiledTemplate,
compilerName = this.getCompilerName(
templateName );
- if (!compiledTemplates[moduleName]) {
+ if ( !compiledTemplates[moduleName] ) {
compiledTemplates[moduleName] = {};
}
--
To view, visit https://gerrit.wikimedia.org/r/179411
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I1ab432ec54e82b05b7c096baa5d4e56dce11aaa9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Daniel Friesen <[email protected]>
Gerrit-Reviewer: Gerrit Patch Uploader <[email protected]>
Gerrit-Reviewer: Jack Phoenix <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits