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

Content deleted Content added
remove deprecated "es5-shim" dependency
update edit counter link to bypass redirect; also try to fix double escaped separators
Line 19:
'ps-userinfo-gendersymbol-female': '♀',
'ps-userinfo-gendersymbol-unknown': '',
'ps-userinfo-itemseparator': ' $1\u{00A0}|  $2',
'ps-userinfo-groupseparator': '$1,  $2',
 
'ps-userinfo-seconds': '$1 {{PLURAL:$1|second|seconds}}',
Line 82:
function displayInfo( info ) {
var userPrefix = mw.config.get( 'wgFormattedNamespaces' )[2] + ':',
hostParts = ___location.hostname.split( '.' ),
items = [],
groups = [],
Line 111 ⟶ 110:
} );
if ( groups.length ) {
items.push( groups.join( mw.message( 'ps-userinfo-groupseparator', '', '' ).parseescaped() ) );
} else {
items.push( mw.message( 'ps-userinfo-user', info.gender ).escaped() );
Line 126 ⟶ 125:
if ( info.editCount !== null ) {
items.push( h.element( 'a', { href:
'https://toolsxtools.wmflabswmcloud.org/supercountec/index.php?' + $.param( {
hostParts = encodeURIComponent( ___location.hostname.split( ) + './' ),+
user:encodeURIComponent( info.name, )
project: hostParts.slice( 0, -1 ).join( '.' )
} )
}, mw.message( 'ps-userinfo-editcount', info.editCount ).text() ) );
}
Line 155 ⟶ 153:
 
// Replace the subtitle with the rest of the info
$( '#siteSub' ).html( items.join( mw.message( 'ps-userinfo-itemseparator', '', '' ).parseescaped() ) );
}