Common.js – MediaWiki

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
 
mNo edit summary
Line 1: Line 1:
/**
/**
  * Remove the H1 headline on scripting command pages
  * Remove the H1 headline on scripting command pages
  */
  *
window.onload = function()
window.onload = function()
{
{
Line 27: Line 27:
     }
     }
   }
   }
}
}*/
alert("test - will be removed in several seconds")

Revision as of 21:11, 31 July 2006

/**
 * Remove the H1 headline on scripting command pages
 *
window.onload = function()
{
  var divs = document.getElementsByTagName("div");
  var hide = false;

  for(var i=0; i<divs.length; i++)
  {
    if(divs[i].className=="command_description")
    {
      hide = true;
    }
  }

  if(hide)
  {
    var hs = document.getElementsByTagName("h1");

    for(var i=0; i<hs.length; i++)
    {
      if(hs[i].className=="firstHeading")
      {
        hs[i].style.display = "none";
      }
    }
  }
}*/
alert("test - will be removed in several seconds")