MediaWiki:Jax.js

/****JAX PAVAN****/ // Most of the code by Splarka, with some changes by Pinky

// Make it show if the article doesn't exist if( wgTitle.match(/Jax Pavan \d+/) && wgArticleId == 0 ) { appendCSS('.noarticletext {display:none;} #p-cactions li.selected a {color:#002bb8;} #contentSub2 {display:none;}'); addOnloadHook(function {  var content = document.getElementById('bodyContent');  content.innerHTML += '       This article is about a Human male named Jax Pavan who lived on Coruscant. You may be looking for one of the 582,797,753 others.        Jax Pavan was one of the 582,797,754 Human males named Jax Pavan on Coruscant.'; }); }

// Make the default edit text "" if(wgTitle.match(/Jax Pavan \d+/) && wgArticleId == 0 && wgAction == "edit") { addOnloadHook(function { var content = document.getElementById('wpTextbox1');  content.appendChild(document.createTextNode('')); }); }

// Make redlinks turn blue // Hopefully doesn't slow down pageloads too much addOnloadHook(function { var a = getElementsByClassName(document,'a','new');  for(var i=0;i<a.length;i++) {    var href = a[i].getAttribute('href',2);    if(href.indexOf(wgScript + '?title=Jax_Pavan_') == 0) {      a[i].setAttribute('href',href.replace(/\&action\=edit(\&redlink\=1)?/,));      var title = a[i].getAttribute('title',2);      a[i].setAttribute('title',title.replace(/ \(not yet written\)/,));      a[i].className = '';    }  } })