User:MrSomeone/common.js

function shortenTabs {  if(document.getElementById('ca-nstab-user')) document.getElementById('ca-nstab-user').firstChild.innerHTML = 'usr'; if(document.getElementById('ca-format')) document.getElementById('ca-format').firstChild.innerHTML = 'fmt'; if(document.getElementById('ca-move')) document.getElementById('ca-move').firstChild.innerHTML = 'mv'; if(document.getElementById('ca-edit')) document.getElementById('ca-edit').firstChild.innerHTML = 'edit'; if(document.getElementById('ca-history')) document.getElementById('ca-history').firstChild.innerHTML = 'hist'; if(document.getElementById('ca-talk')) document.getElementById('ca-talk').firstChild.innerHTML = 'tlk'; if(document.getElementById('ca-unwatch')) document.getElementById('ca-unwatch').firstChild.innerHTML = 'unw'; if(document.getElementById('ca-watch')) document.getElementById('ca-watch').firstChild.innerHTML = 'w'; }

function addWelcomeLinks {  recent2.addToolboxLink('javascript:wikiUserTalkWelcome( false );', 'Welcome!', 'willkommen'); recent2.addToolboxLink('javascript:wikiUserTalkWelcome( "nc" );', 'Welcome! (NC)', 'willkommen'); recent2.addToolboxLink('javascript:wikiUserTalkWelcome( "anon" );', 'Welcome! (Anon)', 'willkommen'); }

function wikiUserTalkWelcome( sw ) {  var msg = ''; if( sw == 'nc')  { msg = ''; } // if( sw == 'anon') { msg = ' ' + ''; } if( sw == 'anon') { msg = 'MrSomeone ' + ''; } var willkommen = new Array(      msg,      'Welcome to Wikipedia!'   ); document.getElementById( 'wpTextbox1' ).value += "\n" + willkommen[0]; document.getElementById( 'wpSummary' ).value  = willkommen[1]; if( sw != 'anon' ) document.getElementById( 'wpSave' ).click; }

function doOnLoad {  return false; shortenTabs; if (document.title.indexOf("Editing User talk:") != -1) {     addWelcomeLinks; } }

window.onload = doOnLoad;