Difference between revisions of "MediaWiki:Common.js"

From CSLabsWiki
m (;-D)
m (Undo revision 2781 by Lewisrj (Talk))
 
Line 3: Line 3:
   
 
function clearMainPage(){
 
function clearMainPage(){
if (wgTitle == 'Main Page' || wgTitle == 'User:Lewisrj') {
+
if (wgTitle == 'Main Page') {
 
var h1tags = document.getElementsByTagName("h1");
 
var h1tags = document.getElementsByTagName("h1");
 
var h = h1tags[0];
 
var h = h1tags[0];

Latest revision as of 15:30, 8 July 2009

/* Any JavaScript here will be loaded for all users on every page load. */
//BEGIN remove Main Page title

function clearMainPage(){
     if (wgTitle == 'Main Page') {
          var h1tags = document.getElementsByTagName("h1");
          var h = h1tags[0];
          var parent = h.parentNode;

          parent.removeChild(h);
     }
}

addOnloadHook(clearMainPage);

//END remove Main Page title