User:Jack Phoenix/global.js

//

// ***************************************************************** // LookupContribs link on Special:Contributions // ***************************************************************** function contribtools { var cs = document.getElementById('contentSub'); // poorman contribs type finder. -1 = existing user var ctype = cs.getElementsByTagName('a')[0].href.indexOf('User_talk');

var lulink = 'http://www.wikia.com/wiki/Special:Lookupcontribs?mode=normal&view=full&target='; var lu1 = document.createTextNode(' | '); var lu2 = document.createElement('a'); lu2.href = lulink + document.forms[0].target.value.replace(/_/g,'+'); lu2.setAttribute( 'title', lu2.href ); lu2.appendChild( document.createTextNode( 'LookupContribs' ) ); cs.insertBefore( lu1, cs.childNodes[cs.childNodes.length-1] ); cs.insertBefore( lu2, cs.childNodes[cs.childNodes.length-1] );

} if( ( skin == 'monobook' ) && ( wgCanonicalSpecialPageName == 'Contributions' ) ) addOnloadHook( contribtools );

// ***************************************************************** // Load Zocky's SearchBox JS globally // ***************************************************************** importScriptURI('http://en.wikipedia.org/w/index.php?title=User:Zocky/SearchBox.js&action=raw&ctype=text/javascript&dontcountme=s');

// ***************************************************************** // &bot=1 on contribs pages. // ***************************************************************** function hiderollback { var botlink = document.location.href; if( botlink.indexOf('?') == -1 ) { botlink += '?bot=1'; } else { botlink += '&bot=1'; }	addPortletLink( 'p-cactions', botlink, '&bot=1', 'ca-bot' ); } if( ( skin == 'monobook' ) && ( wgCanonicalSpecialPageName == 'Contributions' ) ) addOnloadHook( hiderollback );

// Quick hack if( wgAction == 'edit' && wgDB == 'starwars' ) { appendCSS('.permissions-errors { display: none !important; }'); document.getElementById('wpTextbox1').removeAttribute('readonly'); }

//