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

Content deleted Content added
actually display the user info
use a different separator for the list of user groups
Line 19:
'ps-userinfo-gendersymbol-female': '♀',
'ps-userinfo-gendersymbol-unknown': '',
'ps-userinfo-separatoritemseparator': ' | ',
'ps-userinfo-groupseparator': ', ',
 
'ps-userinfo-seconds': '$1 {{PLURAL:$1|second|seconds}}',
Line 83 ⟶ 84:
hostParts = ___location.hostname.split( '.' ),
items = [],
groups = [],
text = '';
 
Line 105 ⟶ 107:
$.each( info.groups, function ( i, v ) {
if ( $.inArray( v, ['*', 'user', 'autoconfirmed'] ) < 0 ) {
itemsgroups.push( mw.message( 'group-' + v + '-member', info.gender ).parse() );
}
} );
if ( groups.length ) {
items.push( groups.join( mw.message( 'ps-userinfo-groupseparator' ).parse() ) );
}
 
if ( info.registration ) {
Line 142 ⟶ 147:
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
$( '#siteSub' ).html( items.join( mw.message( 'ps-userinfo-separatoritemseparator' ).parse() ) );
}