Content deleted Content added
PleaseStand (talk | contribs) attempt to fix namespace check |
PleaseStand (talk | contribs) Undid revision 1225074654 by PleaseStand (talk) - "named" group was removed in git:mediawiki/core/+/93e8350d295203ac |
||
(19 intermediate revisions by the same user not shown) | |||
Line 19:
'ps-userinfo-gendersymbol-female': '♀',
'ps-userinfo-gendersymbol-unknown': '',
'ps-userinfo-itemseparator': '
'ps-userinfo-groupseparator': '$1,
'ps-userinfo-seconds': '$1 {{PLURAL:$1|second|seconds}}',
Line 31:
'ps-userinfo-years-months': '$1 {{PLURAL:$1|year|years}} $2 {{PLURAL:$2|month|months}}',
'ps-userinfo-blocked':
'ps-userinfo-editcount': '$1 {{PLURAL:$1|edit|edits}}',
'ps-userinfo-invalid': 'invalid username',
'ps-userinfo-ipv4': 'IPv4 address',
'ps-userinfo-ipv6': 'IPv6 address',
'ps-userinfo-lastedited': 'last edited [$2 $1 ago]',
'ps-userinfo-missing': '
'ps-userinfo-registration': '$1 old',
'ps-userinfo-user': '{{GENDER:$1|registered user}}'
Line 68:
groups: user.groups || [],
editCount: 'editcount' in user ? user.editcount : null,
registration:
isBlocked: 'blockexpiry' in user,
gender: user.gender || 'unknown',
lastEdited: ( contribs && contribs[0] ) ?
};
} );
Line 82:
function displayInfo( info ) {
var userPrefix = mw.config.get( 'wgFormattedNamespaces' )[2] + ':',
hostParts = ___location.hostname.split( '.' ),▼
items = [],
groups = [],
Line 93 ⟶ 92:
page: userPrefix + info.name
} )
}, new h.Raw( h.element( 'strong', {}, mw.
}
if ( info.isMissing ) {
items.push( mw.message( 'ps-userinfo-missing' ).
} else if ( info.isIPv4 ) {
items.push( mw.message( 'ps-userinfo-ipv4' ).
} else if ( info.isIPv6 ) {
items.push( mw.message( 'ps-userinfo-ipv6' ).
} else if ( info.isInvalid ) {
items.push( mw.message( 'ps-userinfo-invalid' ).
} else {
$.each( info.groups, function ( i, v ) {
if ( $.inArray( v, ['*', 'user', 'autoconfirmed'] ) < 0 ) {
groups.push( mw.message( 'group-' + v + '-member', info.gender ).
}
} );
if ( groups.length ) {
items.push( groups.join( mw.message( 'ps-userinfo-groupseparator', '', '' ).
} else {
}
Line 119 ⟶ 120:
buildDurationMessage( info.registration, new Date() ).text(),
info.gender
).
}
if ( info.editCount !== null ) {
items.push( h.element( 'a', { href:
'https://
user: info.name,▼
encodeURIComponent( info.name )
}, mw.message( 'ps-userinfo-editcount', info.editCount ).text() ) );
▲ }, new h.Raw( mw.message( 'ps-userinfo-editcount', info.editCount ).parse() ) ) );
}
}
Line 135:
items.push( mw.message(
'ps-userinfo-lastedited',
buildDurationMessage( info.lastEdited, new Date() ).
$( '<a>' ).prop( 'href', mw.util.getUrl( 'Special:Contributions/' + info.name ) ),
).parse() );
}
Line 148 ⟶ 149:
fontSize: '75%'
} )
.
.appendTo( '#firstHeading' );
// Replace the subtitle with the rest of the info
$( '#siteSub' ).html( items.join( mw.message( 'ps-userinfo-itemseparator', '', '' ).
}
Line 163 ⟶ 164:
action: 'query',
amfilter: '-member',
amlang:
amprefix: 'group-',
maxage: 86400,
Line 172 ⟶ 173:
} );
} );
}
Line 241 ⟶ 223:
'mediawiki.api',
'mediawiki.jqueryMsg',
'mediawiki.language',
'mediawiki.util'
], function () {
|