$.fn.badge = function ( text, inline, displayZero ) {
var $badge = this.find( '.mw-badge' ),
badgeStyleClass = 'mw-badge-' + ( inline ? 'inline' : 'overlay' ),
- isImportant = true, displayBadge = true;
+ isImportant = true,
+ displayBadge = true;
// If we're displaying zero, ensure style to be non-important
if ( mw.language.convertNumber( text, true ) === 0 ) {
if ( $badge.length ) {
$badge
.toggleClass( 'mw-badge-important', isImportant )
- .find( '.mw-badge-content' )
- .text( text );
+ .find( '.mw-badge-content' ).text( text );
} else {
// Otherwise, create a new badge with the specified text and style
$badge = $( '<div class="mw-badge"></div>' )