Apply coding conventions for JavaScript
Change-Id: Id158ac08d32cc7421e47ae6abdd2bd80879f04d9
This commit is contained in:
committed by
[[mw:User:Fomafix]]
parent
24d48b5870
commit
0833c990e7
@@ -239,7 +239,7 @@
|
|||||||
var assistantLanguages = mw.user.options.get( 'translate-editlangs' );
|
var assistantLanguages = mw.user.options.get( 'translate-editlangs' );
|
||||||
|
|
||||||
if ( assistantLanguages && assistantLanguages !== 'default' ) {
|
if ( assistantLanguages && assistantLanguages !== 'default' ) {
|
||||||
return $.grep( assistantLanguages.split(/,\s*/), function ( language ) {
|
return $.grep( assistantLanguages.split( /,\s*/ ), function ( language ) {
|
||||||
return $.inArray( language, languages ) >= 0;
|
return $.inArray( language, languages ) >= 0;
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -533,7 +533,7 @@
|
|||||||
mw.webfonts.setup();
|
mw.webfonts.setup();
|
||||||
|
|
||||||
// Allow the webfonts library to finish loading
|
// Allow the webfonts library to finish loading
|
||||||
setTimeout( function() {
|
setTimeout( function () {
|
||||||
displaySettings.$webfonts = $( 'body' ).data( 'webfonts' );
|
displaySettings.$webfonts = $( 'body' ).data( 'webfonts' );
|
||||||
|
|
||||||
mw.webfonts.preferences.enable();
|
mw.webfonts.preferences.enable();
|
||||||
|
|||||||
@@ -98,10 +98,10 @@
|
|||||||
|
|
||||||
for ( index = 0; index < length; index++ ) {
|
for ( index = 0; index < length; index++ ) {
|
||||||
$fixture.text( text[index] );
|
$fixture.text( text[index] );
|
||||||
width[index] = $fixture.width() || width[index-1];
|
width[index] = $fixture.width() || width[index - 1];
|
||||||
height[index] = $fixture.height();
|
height[index] = $fixture.height();
|
||||||
|
|
||||||
if( index > 0 &&
|
if ( index > 0 &&
|
||||||
( width[index] !== width[index - 1] ||
|
( width[index] !== width[index - 1] ||
|
||||||
height[index] !== height[index - 1] )
|
height[index] !== height[index - 1] )
|
||||||
) {
|
) {
|
||||||
@@ -206,7 +206,7 @@
|
|||||||
// Execute after task queue is processed so that the rendering is complete.
|
// Execute after task queue is processed so that the rendering is complete.
|
||||||
// This is important because webfonts behavior depends on the font-family
|
// This is important because webfonts behavior depends on the font-family
|
||||||
// property values set by stylesheets.
|
// property values set by stylesheets.
|
||||||
setTimeout( function() {
|
setTimeout( function () {
|
||||||
$( 'body' ).webfonts();
|
$( 'body' ).webfonts();
|
||||||
|
|
||||||
// Load the CSS required for the Autonym font. Note that this won't download the font.
|
// Load the CSS required for the Autonym font. Note that this won't download the font.
|
||||||
|
|||||||
Reference in New Issue
Block a user