if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Log' && $( 'h1#firstHeading' ).text() === 'User creation log' ) {
var mwUser = mw.config.get( 'wgUserName' );
if ( $( 'p:contains( "No matching items in log." )' ).html() !== undefined ) {
$( 'p:contains( "No matching items in log." )' ).addClass( 'error' );
$( 'h1#firstHeading' ).html( tickGood + ' ' + $( 'h1#firstHeading' ).html() );
document.title = Ucheck + document.title;
} else {
var limit = 0;
if ( document.location.href.search( '&limit=' ) !== -1 ) {
limit = parseInt( document.location.href.substr( document.location.href.search( '&limit=' ) + 7 ), 10 );
}
if ( $( 'p:contains( "No matching items in log." )' ).html() === undefined && $( 'input#mw-log-page' ).val().substr( 5 ) !== '' && limit === 1 ) {
$( 'h1#firstHeading' ).html(tickBad + ' ' + $( 'h1#firstHeading' ).html() );
document.title = Ucheck + document.title;
alert( 'WARNING!\n\t\tThere is a local account for:\n\n\t\t' + $( 'input#mw-log-page' ).val().substr( 5 ).replace( '_', ' ' ));
}
else if ( $( 'input#mw-log-user' ).val().replace( '_', ' ' ) === mwUser && limit !== 1000 ) {
setTimeout(function() { location += '&limit=1000'; }, 1 );
}
else if ( $( 'input#mw-log-user' ).val().replace( '_', ' ' ) === mwUser ) {
$( 'li.mw-logline-newusers' ).closest( 'ul' ).replaceWith( '<ol reverse="reverse">\n' + $( 'li.mw-logline-newusers' ).closest( 'ul' ).html() + '\n</ol>' );
// $( 'li.mw-logline-newusers' ).css( 'list-style-image', '/* none */' );
// $( 'li.mw-logline-newusers' ).css( 'list-style-type', 'decimal' );
$( 'li.mw-logline-newusers' ).each( function() {
$( this ).html( $( this ).html().replace( ' by <a href="https://wikifreehand.com/en/User:' + mwUser.replace( ' ', '_' ) + '" title="User:' + mwUser + '" class="mw-userlink">' + mwUser + '</a> <span class="mw-usertoollinks">(<a href="https://wikifreehand.com/en/User_talk:' + mwUser.replace( ' ', '_' ) + '" title="User talk:' + mwUser + '">talk</a> | <a href="https://wikifreehand.com/en/Special:Contributions/' + mwUser.replace( ' ', '_' ) + '" title="Special:Contributions/' + mwUser + '">contribs</a>)</span>', '' ) );
} );
}
$( 'li.mw-logline-newusers' ).find( 'span.comment' ).each( function() {
if ( parseInt( $( this ).html().lastIndexOf( 'WP:ACC</a>' ), 10 ) !== -1 ) {
var ACC = $( this ).html().substr( ( parseInt( $( this ).html().lastIndexOf( '#' ), 10 ) + 1 ), ( parseInt( $( this ).html().match( /#*/ ).length, 10 ) - 1 ) );// ACC zoom number
$( this ).html( $( this ).html().replace( 'Requested account at <a href="https://wikifreehand.com/en/Wikipedia:ACC" class="mw-redirect" title="Wikipedia:ACC">WP:ACC</a>, request #' + ACC, '<a href="https://wikifreehand.com/en/Wikipedia:Request an account" class="mw-redirect" title="Wikipedia:Request an account">ACC</a> request <a href="//accounts.wmflabs.org/acc.php?action=zoom&id=' + ACC + '" title="Account Creation Interface\n\tRequest: #' + ACC + '">#' + ACC + '</a>' ) );
}
} );
$( 'span.mw-usertoollinks' ).each( function( i ) {
var thisUser = $( this ).prev( 'a' ).text();
var thisUserToolLinks = '';
var thisUserInfo = { groups: , blocked: { isBlocked: false } };
new mw.Api().get( {
action: 'query',
list: 'users',
usprop: ,
ususers: encodeURIComponent( thisUser ),
continue: ''
} ).done( function( userInfoQuery ) {
/* Create an object with all the data for the current user */
thisUserInfo.editCount = userInfoQuery.query.users.editcount;
thisUserInfo.groups = userInfoQuery.query.users.groups;
if ( userInfoQuery.query.users.blockid ) {
thisUserInfo.blocked.isBlocked = true;
thisUserInfo.blocked.isBlockedBy = userInfoQuery.query.users.blockedby;
thisUserInfo.blocked.isBlockedTimestamp = userInfoQuery.query.users.blockedtimestamp;
thisUserInfo.blocked.isBlockedReason = userInfoQuery.query.users.blockreason;
thisUserInfo.blocked.isBlockedExpiry = userInfoQuery.query.users.blockexpiry;
}
thisUserInfo.gender = userInfoQuery.query.users.gender;
thisUserInfo.emailable = ( userInfoQuery.query.users.emailable === undefined ) ? false : true;
/* Create the replacement text */
var thisUserTalk = '<a href="//en.wikipedia.orghttps://wikifreehand.com/en/User_talk:' + encodeURIComponent( thisUser ) + '" title="leave a message on ' + thisUser + '\'s talk page"';
if( $( this ).find( 'span.mw-usertoollinks a.new:first' ) ) {
thisUserTalk += ' class"new"';
}
thisUserTalk += '>t</a>';
var thisUserEmail = '';
if ( thisUserInfo.emailable ) {
thisUserEmail = ' | <a href="//en.wikipedia.orghttps://wikifreehand.com/en/Special:EmailUser/' + encodeURIComponent( thisUser ) + '" title="send ' + thisUser + ' an email">e</a>';
}
var thisUserContribClass = '';
if ( thisUserInfo.editCount <= 0 ){
thisUserContribClass = 'class="new"';
} else if ( thisUserInfo.editCount === 'NaN' ) {
thisUserContribClass = 'class="new error"';
}
var thisUserContribs = ' | <a' + thisUserContribClass + ' href="//en.wikipedia.orghttps://wikifreehand.com/en/Special:Contributions/' + encodeURIComponent( thisUser ) + '" title="view all contributions for ' + thisUser + '">' + thisUserInfo.editCount + '</a>';
var thisUserLogs = ' | <a href="//en.wikipedia.orghttps://wikifreehand.com/en/Special:Logs/' + encodeURIComponent( thisUser ) + '" title="view all logs for ' + thisUser + '">l</a>';
var thisUserWel = ' | <a href="#" title="send ' + thisUser + ' a welcome to the English Wikipedia">wel</a>';
var thisUserTH = ' | <a href="#" title="send ' + thisUser + ' an invitation to the Teahouse">th</a>';
var thisUserBlocked = '';
if( thisUserInfo.blocked.isBlocked === false ){
var thisUserSPI = ' | <a href="#" title="report ' + thisUser + ' to SPI">SPI</a>';
var thisUserAIV = ' | <a href="#" title="report ' + thisUser + ' to AIV">AIV</a>';
var thisUserUAA = ' | <a href="#" title="report ' + thisUser + ' to UAA">UAA</a>';
thisUserBlocked = thisUserSPI + thisUserAIV + thisUserUAA;
} else {
thisUserBlocked = ' | <a href="" class="error" style="font-variant: small-caps;" title="' + thisUser + ' was bad. ' + thisUserInfo.gender.replace( 'male', 'He was' ).replace( 'female', 'She was' ).replace( 'unspecified', 'They were' ) + ' blocked for ' + thisUserInfo.blocked.isBlockedExpiry.replace( 'infinity', 'forever' ) + ' by ' + thisUserInfo.blocked.isBlockedBy + ' with a reason of:\n\t' + thisUserInfo.blocked.isBlockedReason + '">Blocked</a>';
}
thisUserToolLinks = '<span class="mw-usertoollinks" style="font-family: monospace;">( ' + thisUserTalk + thisUserEmail + thisUserContribs + thisUserLogs/* + thisUserWel + thisUserTH*/ + thisUserBlocked + ' )</span>';
/* Apply the replacement text */
$( 'span.mw-usertoollinks' ).eq( i ).replaceWith( thisUserToolLinks );
} );
} );
}
}