Welcome to the Club Penguin Wiki! Log in or Create an account to join the community!

MediaWiki:Monaco.js

From the Club Penguin Wiki, the free, editable encyclopedia about Club Penguin
Revision as of 17:27, 31 January 2010 by imported>Zapwire (Created page with 'function addStyles () { try { var cats = document.getElementById('catlinks').getElementsByTagName('a'); var inCat, catName; for (var i = 0; i < cats.length; i++) { catName = cats…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump 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.
function addStyles () {
try {
var cats = document.getElementById('catlinks').getElementsByTagName('a');
var inCat, catName;
for (var i = 0; i < cats.length; i++) {
catName = cats[i].title
if (catName === 'Category:News') {
inCat = true;
}
}
 
if (inCat) importStylesheet('MediaWiki:Blog.css');
}catch (e) { /*might happen if no cats. ignore errors */}
}
addOnloadHook(addStyles);