User:Skenmy/monobook.js

From Perplex City Wiki
< User:Skenmy
Revision as of 19:19, 12 October 2006 by Skenmy (talk | contribs) (add)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
//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);
  }
});