User:Skenmy/monobook.js: Difference between revisions

From Perplex City Wiki
Jump to navigationJump to search
m (add)
 
(No difference)

Latest revision as of 19:19, 12 October 2006

//Title override
addOnloadHook(function() {
  if(document.getElementById('titleOverride')!=null)
  {
    var h1s=document.body.getElementsByTagName("h1");
    var i;
    for(i in h1s)
      if(h1s[i].className=="firstHeading")
        h1s[i].replaceChild(document.getElementById('titleOverride').firstChild,
                            h1s[i].firstChild);
  }
});