r106178 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106177‎ | r106178 | r106179 >
Date:12:19, 14 December 2011
Author:nikerabbit
Status:ok
Tags:
Comment:
Some JSHint fixes
Modified paths:
  • /trunk/extensions/WebFonts/resources/ext.webfonts.js (modified) (history)

Diff [purge]

Index: trunk/extensions/WebFonts/resources/ext.webfonts.js
@@ -138,10 +138,10 @@
139139 fontFormats.push( "\t\turl('" + base + fontconfig.ttf + versionSuffix + "') format('truetype')" );
140140 }
141141
142 - styleString += fontFormats.join() + ";\n"
 142+ styleString += fontFormats.join() + ";\n";
143143 styleString += "\tfont-weight: normal;\n}\n</style>\n";
144144
145 - //inject the css to the head of the page.
 145+ //inject the css to the head of the page.
146146 $( styleString ).appendTo( 'head' );
147147 },
148148
@@ -231,6 +231,7 @@
232232 loadFontsForLangAttr: function() {
233233 var languages = mw.webfonts.config.languages;
234234 var requested = [mw.config.get( 'wgUserVariant' ), mw.config.get( 'wgContentLanguage' ), mw.config.get( 'wgUserLanguage' )];
 235+ var fontFamily = false;
235236 // If there are tags with lang attribute,
236237 $( 'body' ).find( '*[lang]' ).each( function( index ) {
237238 // If the lang attribute value is same as one of
@@ -303,7 +304,7 @@
304305 return null;
305306 }
306307
307 - var $resetLink = $( '<input type="radio" name="font"/>' )
 308+ var $resetLink = $( '<input type="radio" name="font" />' )
308309 .attr( 'value', 'webfont-none' )
309310 .attr( 'id', 'webfont-none' )
310311 .click( function( e ) {
@@ -334,7 +335,7 @@
335336 */
336337 buildMenu: function(config) {
337338 var $menuItemsDiv = mw.webfonts.buildMenuItems( config );
338 - if( $menuItemsDiv == null ) {
 339+ if( $menuItemsDiv === null ) {
339340 return;
340341 }
341342 var $menu = $( '<div>' )

Status & tagging log