User:PleaseStand/userinfo-dev.js: Difference between revisions

Content deleted Content added
fix ps-userinfo-registration message
actually display the user info
Line 16:
// TODO: add additional languages
mw.messages.set( {
'ps-userinfo-gendersymbol-male': '♂',
'ps-userinfo-gendersymbol-female': '♀',
'ps-userinfo-gendersymbol-unknown': '',
'ps-userinfo-separator': ' | ',
 
Line 132 ⟶ 135:
}
 
// Add the gender symbol after the user's name
console.log( items.join( mw.message( 'ps-userinfo-separator' ).parse() ) );
$( '<span>' )
.prop( 'id', 'ps-gender-' + info.gender )
.css( {
paddingLeft: '0.25em',
fontFamily: '"Lucida Grande", "Lucida Sans Unicode", sans-serif',
fontSize: '75%'
})
.html( mw.message( 'ps-userinfo-gendersymbol-' + info.gender ).parse() )
.appendTo( '#firstHeading' );
 
// Replace the subtitle with the rest of the info
console$( '#siteSub' ).loghtml( items.join( mw.message( 'ps-userinfo-separator' ).parse() ) );
}