User:SVG/contributionslinks.js

// Add a link to Special:LookupContribs/USERNAME at Special:Contributions // Written by Grunny, modified by SVG

if( wgCanonicalSpecialPageName === 'Contributions' ) { $( contribLinks ); }

function contribLinks { var	ug = wgUserGroups.join(' '), ctype, targ = $( 'input[name="target"]' ).val; // poorman contribs type finder. -1 = existing user try { ctype = $( '#contentSub > a:first' ).attr( 'href' ).indexOf( 'User_talk' ); } catch(e) { ctype = -1; }	if( !targ ) { return; }	if( ctype === -1 ) { if( wgCityId !== '177' ){ insertContentSubContribLink( 'http://community.wikia.com/wiki/Special:LookupContribs?target=' + targ.replace(/_/g,'+'), 'Lookup Contribs' ); }	} }

//jQuery version of Splarka's insertContentSubContribLink, by Grunny function insertContentSubContribLink( link, text ) { $( '#contentSub > a:last' ).after( ' | ' + text + '' ); }