jenkins-bot has submitted this change and it was merged.
Change subject: Hygiene: Enforce requireSpacesInsideParentheses
......................................................................
Hygiene: Enforce requireSpacesInsideParentheses
Change-Id: Ibf1b3fcd8890287372def25b518b06036559e05e
---
M javascripts/Overlay.js
M javascripts/application.js
M javascripts/mainmenu.js
M javascripts/modules/editor/AbuseFilterPanel.js
M javascripts/modules/issues/issues.js
M javascripts/modules/nearby/Nearby.js
M javascripts/modules/nearby/NearbyApi.js
M javascripts/modules/notifications/notifications.js
M javascripts/modules/search/SearchApi.js
M javascripts/modules/search/SearchOverlay.js
M javascripts/modules/search/search.js
M javascripts/modules/toggling/toggle.js
M javascripts/modules/uploads/PhotoUploaderButton.js
M javascripts/modules/uploads/UploadTutorial.js
M javascripts/modules/watchstar/Watchstar.js
M javascripts/modules/wikigrok/WikiGrokDialog.js
M javascripts/modules/wikigrok/WikiGrokDialogB.js
M javascripts/settings.js
M javascripts/specials/uploads.js
19 files changed, 32 insertions(+), 30 deletions(-)
Approvals:
Jhernandez: Looks good to me, approved
Florianschmidtwelzow: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/javascripts/Overlay.js b/javascripts/Overlay.js
index 1e12625..69ba0d7 100644
--- a/javascripts/Overlay.js
+++ b/javascripts/Overlay.js
@@ -186,7 +186,7 @@
this.$el.removeClass( 'visible' );
// give time for animations to finish
- setTimeout(function () {
+ setTimeout( function () {
self.$el.detach();
}, 1000 );
@@ -236,7 +236,7 @@
} // FIXME: implement a
solution from https://devforums.apple.com/message/1050636#1050636
if ( $window.height() >
keyboardHeight ) {
-
self._resizeContent($window.height() - keyboardHeight);
+
self._resizeContent( $window.height() - keyboardHeight );
}
}, 0 );
} )
diff --git a/javascripts/application.js b/javascripts/application.js
index 7ebf064..84315e5 100644
--- a/javascripts/application.js
+++ b/javascripts/application.js
@@ -312,7 +312,7 @@
sessionId = '';
while ( sessionId.length < 32 ) {
// http://stackoverflow.com/a/8084248/365238
- sessionId +=
Math.random().toString(36).slice(2, 32 + 2 - sessionId.length);
+ sessionId += Math.random().toString( 36
).slice( 2, 32 + 2 - sessionId.length );
}
localStorage.setItem( 'sessionId', sessionId );
}
diff --git a/javascripts/mainmenu.js b/javascripts/mainmenu.js
index 8958b14..25399c2 100644
--- a/javascripts/mainmenu.js
+++ b/javascripts/mainmenu.js
@@ -39,7 +39,7 @@
} );
// close navigation if content tapped
- $( '#mw-mf-page-center' ).on( 'click', function (ev) {
+ $( '#mw-mf-page-center' ).on( 'click', function ( ev ) {
if ( isOpen() ) {
closeNavigationDrawers();
ev.preventDefault();
@@ -56,4 +56,4 @@
M.on( 'header-loaded', initialize );
-}( mw.mobileFrontend, jQuery ));
+}( mw.mobileFrontend, jQuery ) );
diff --git a/javascripts/modules/editor/AbuseFilterPanel.js
b/javascripts/modules/editor/AbuseFilterPanel.js
index a00860b..acf191a 100644
--- a/javascripts/modules/editor/AbuseFilterPanel.js
+++ b/javascripts/modules/editor/AbuseFilterPanel.js
@@ -11,7 +11,7 @@
*/
AbuseFilterPanel = View.extend( {
defaults: {
- readMoreMsg: mw.msg(
'mobile-frontend-editor-abusefilter-read-more')
+ readMoreMsg: mw.msg(
'mobile-frontend-editor-abusefilter-read-more' )
},
template: mw.template.get( 'mobile.abusefilter', 'Panel.hogan'
),
className: 'panel hidden',
diff --git a/javascripts/modules/issues/issues.js
b/javascripts/modules/issues/issues.js
index 262eaa3..ee550c4 100644
--- a/javascripts/modules/issues/issues.js
+++ b/javascripts/modules/issues/issues.js
@@ -1,6 +1,6 @@
( function ( M, $ ) {
- var module = (function () {
+ var module = ( function () {
var
Icon = M.require( 'Icon' ),
inBeta = M.isBetaGroupMember(),
@@ -94,4 +94,4 @@
M.define( 'cleanuptemplates', module );
-}( mw.mobileFrontend, jQuery ));
+}( mw.mobileFrontend, jQuery ) );
diff --git a/javascripts/modules/nearby/Nearby.js
b/javascripts/modules/nearby/Nearby.js
index 8cded34..97b5921 100644
--- a/javascripts/modules/nearby/Nearby.js
+++ b/javascripts/modules/nearby/Nearby.js
@@ -138,7 +138,7 @@
.done( pagesSuccess )
.fail( pagesError );
} else if ( options.pageTitle ) {
- this.nearbyApi.getPagesAroundPage(
options.pageTitle, this.range)
+ this.nearbyApi.getPagesAroundPage(
options.pageTitle, this.range )
.done( pagesSuccess )
.fail( pagesError );
} else {
@@ -166,7 +166,7 @@
} ).on( 'click', function () {
window.location.hash = $( this ).attr( 'id' );
// name funnel for watchlists to catch
subsequent uploads
- $.cookie( 'mwUploadsFunnel', 'nearby', {
expires: new Date( new Date().getTime() + 60000) } );
+ $.cookie( 'mwUploadsFunnel', 'nearby', {
expires: new Date( new Date().getTime() + 60000 ) } );
} );
// Restore the offset
diff --git a/javascripts/modules/nearby/NearbyApi.js
b/javascripts/modules/nearby/NearbyApi.js
index aace24e..60defc4 100644
--- a/javascripts/modules/nearby/NearbyApi.js
+++ b/javascripts/modules/nearby/NearbyApi.js
@@ -111,7 +111,7 @@
ggsnamespace: ns,
ggslimit: limit
};
- $.extend( requestParams, params);
+ $.extend( requestParams, params );
this.get( requestParams, {
dataType: endpoint ? 'jsonp' : 'json',
diff --git a/javascripts/modules/notifications/notifications.js
b/javascripts/modules/notifications/notifications.js
index 51af2d1..19832c3 100644
--- a/javascripts/modules/notifications/notifications.js
+++ b/javascripts/modules/notifications/notifications.js
@@ -53,7 +53,7 @@
overlay.on( 'hide', function () {
mainmenu.closeNavigationDrawers();
$( '#mw-mf-page-center' ).off(
'.secondary' );
- });
+ } );
$( '#mw-mf-page-center' ).one(
'click.secondary', function () {
M.router.back();
diff --git a/javascripts/modules/search/SearchApi.js
b/javascripts/modules/search/SearchApi.js
index 27701d5..d1e10de 100644
--- a/javascripts/modules/search/SearchApi.js
+++ b/javascripts/modules/search/SearchApi.js
@@ -96,4 +96,4 @@
M.define( 'modules/search/SearchApi', SearchApi );
-}( mw.mobileFrontend, jQuery ));
+}( mw.mobileFrontend, jQuery ) );
diff --git a/javascripts/modules/search/SearchOverlay.js
b/javascripts/modules/search/SearchOverlay.js
index d5e237a..71a347b 100644
--- a/javascripts/modules/search/SearchOverlay.js
+++ b/javascripts/modules/search/SearchOverlay.js
@@ -163,4 +163,4 @@
M.define( 'modules/search/SearchOverlay', SearchOverlay );
-}( mw.mobileFrontend, jQuery ));
+}( mw.mobileFrontend, jQuery ) );
diff --git a/javascripts/modules/search/search.js
b/javascripts/modules/search/search.js
index 785b991..2db61f7 100644
--- a/javascripts/modules/search/search.js
+++ b/javascripts/modules/search/search.js
@@ -30,4 +30,4 @@
} );
}
-}( mw.mobileFrontend, jQuery ));
+}( mw.mobileFrontend, jQuery ) );
diff --git a/javascripts/modules/toggling/toggle.js
b/javascripts/modules/toggling/toggle.js
index c15c0ad..90ed7fe 100644
--- a/javascripts/modules/toggling/toggle.js
+++ b/javascripts/modules/toggling/toggle.js
@@ -31,7 +31,7 @@
*/
function storeSectionToggleState( $heading ) {
var headline = $heading.find( 'span' ).attr( 'id' ),
- isSectionOpen = $heading.hasClass( 'open-block'),
+ isSectionOpen = $heading.hasClass( 'open-block' ),
expandedSections = getExpandedSections();
if ( headline ) {
@@ -164,7 +164,7 @@
$container = $container || $( '#content' );
$( 'html' ).removeClass( 'stub' );
- $firstHeading = $container.find( 'h1,h2,h3,h4,h5,h6' ).eq(0);
+ $firstHeading = $container.find( 'h1,h2,h3,h4,h5,h6' ).eq( 0 );
tagName = $firstHeading.prop( 'tagName' ) || 'H1';
$container.find( tagName ).addClass( 'collapsible-heading ' +
iconClass );
@@ -175,13 +175,14 @@
// Old default behavior if on cached output
collapseSectionsByDefault = true;
}
- expandSections = !collapseSectionsByDefault ||
(M.isAlphaGroupMember() && M.settings.getUserSetting( 'expandSections', true )
=== 'true');
+ expandSections = !collapseSectionsByDefault ||
+ ( M.isAlphaGroupMember() && M.settings.getUserSetting(
'expandSections', true ) === 'true' );
$headings.each( function ( i ) {
var $elem = $( this ),
id = 'collapsible-block-' + i;
- $elem.next( '.collapsible-block' ).eq(0)
+ $elem.next( '.collapsible-block' ).eq( 0 )
.attr( {
// We need to give each content block a
unique id as that's
// the only way we can tell screen
readers what element we're
diff --git a/javascripts/modules/uploads/PhotoUploaderButton.js
b/javascripts/modules/uploads/PhotoUploaderButton.js
index 072acc3..066c9e6 100644
--- a/javascripts/modules/uploads/PhotoUploaderButton.js
+++ b/javascripts/modules/uploads/PhotoUploaderButton.js
@@ -14,7 +14,7 @@
var browserSupported = (
typeof FileReader !== 'undefined' &&
typeof FormData !== 'undefined' &&
- ($('<input type="file"/>').prop('type') === 'file') //
Firefox OS 1.0 turns <input type="file"> into <input type="text">
+ ( $( '<input type="file"/>' ).prop( 'type' ) === 'file'
) // Firefox OS 1.0 turns <input type="file"> into <input type="text">
);
return browserSupported && !mw.config.get( 'wgImagesDisabled',
false );
diff --git a/javascripts/modules/uploads/UploadTutorial.js
b/javascripts/modules/uploads/UploadTutorial.js
index 7826ffc..1b1ad89 100644
--- a/javascripts/modules/uploads/UploadTutorial.js
+++ b/javascripts/modules/uploads/UploadTutorial.js
@@ -83,4 +83,4 @@
M.define( 'modules/uploads/UploadTutorial', UploadTutorial );
-}( mw.mobileFrontend, jQuery ));
+}( mw.mobileFrontend, jQuery ) );
diff --git a/javascripts/modules/watchstar/Watchstar.js
b/javascripts/modules/watchstar/Watchstar.js
index 88adfce..06edcfd 100644
--- a/javascripts/modules/watchstar/Watchstar.js
+++ b/javascripts/modules/watchstar/Watchstar.js
@@ -58,7 +58,7 @@
$el = self.$el;
// add tooltip to the div, not the <a> inside because
that the <a> doesn't have dimensions
- this.$el.attr('title', options.tooltip);
+ this.$el.attr( 'title', options.tooltip );
callback = function () {
if ( user.isAnon() ) {
diff --git a/javascripts/modules/wikigrok/WikiGrokDialog.js
b/javascripts/modules/wikigrok/WikiGrokDialog.js
index f08e695..27e23a4 100644
--- a/javascripts/modules/wikigrok/WikiGrokDialog.js
+++ b/javascripts/modules/wikigrok/WikiGrokDialog.js
@@ -159,7 +159,7 @@
// FIXME: add support for DOB
and DOD
if ( options.suggestion.name
=== 'occupations' ) {
// Hack for English
prototype
- if ( $.inArray(
options.claimLabel.charAt(0), vowels ) === -1 ) {
+ if ( $.inArray(
options.claimLabel.charAt( 0 ), vowels ) === -1 ) {
options.contentMsg = 'Was ' + options.name + ' a ' + options.claimLabel + '?';
} else {
options.contentMsg = 'Was ' + options.name + ' an ' + options.claimLabel + '?';
@@ -184,7 +184,7 @@
} else {
self.showError( options, 'There
was an error retrieving tag labels.' );
}
- } ).fail(function () {
+ } ).fail( function () {
self.logError(
'no-impression-cannot-fetch-labels' );
} );
}
@@ -219,7 +219,7 @@
this.apiWikiGrokResponse.recordClaims( [ claim ]
).done( function () {
options.claimRecorded = true;
self.thankUser( options, options.claimRecorded
);
- } ).fail(function () {
+ } ).fail( function () {
self.logError(
'no-response-cannot-record-user-input' );
} );
},
@@ -330,8 +330,8 @@
// Initialize all the buttons and links
// ...for final 'Thanks' step
if ( options.thankUser ) {
- self.$('.wg-buttons' ).hide();
- self.$('.wg-link' ).show();
+ self.$( '.wg-buttons' ).hide();
+ self.$( '.wg-link' ).show();
this.$( '.wg-link .tell-more' ).on( 'click',
function () {
self.hide();
self.log( 'widget-click-moreinfo' );
diff --git a/javascripts/modules/wikigrok/WikiGrokDialogB.js
b/javascripts/modules/wikigrok/WikiGrokDialogB.js
index 36f7351..40a0634 100644
--- a/javascripts/modules/wikigrok/WikiGrokDialogB.js
+++ b/javascripts/modules/wikigrok/WikiGrokDialogB.js
@@ -99,7 +99,7 @@
self.$( '.spinner' ).hide();
self.show();
}
- } ).fail(function () {
+ } ).fail( function () {
self.logError(
'no-impression-cannot-fetch-labels' );
} );
}
diff --git a/javascripts/settings.js b/javascripts/settings.js
index b0cba1b..a4edd81 100644
--- a/javascripts/settings.js
+++ b/javascripts/settings.js
@@ -63,6 +63,6 @@
deleteUserSetting: deleteUserSetting,
cookiesEnabled: cookiesEnabled
};
- }());
+ }() );
}( mw.mobileFrontend, jQuery ) );
diff --git a/javascripts/specials/uploads.js b/javascripts/specials/uploads.js
index 1fc2d19..2fa36e0 100644
--- a/javascripts/specials/uploads.js
+++ b/javascripts/specials/uploads.js
@@ -169,7 +169,8 @@
function getDescription( title ) {
title = title.replace( /\.[^\. ]+$/, '' ); // replace filename
suffix
// strip namespace: prefix and date suffix from remainder
- return title.replace( /^[^:]*:/, '').replace( /
\d{4}-\d{1,2}-\d{1,2} \d{1,2}-\d{1,2}$/, '' );
+ return title.replace( /^[^:]*:/, '' )
+ .replace( / \d{4}-\d{1,2}-\d{1,2} \d{1,2}-\d{1,2}$/, ''
);
}
function getImageDataFromPage( page ) {
--
To view, visit https://gerrit.wikimedia.org/r/171766
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ibf1b3fcd8890287372def25b518b06036559e05e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: Awjrichards <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Jhernandez <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits