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

MediaWiki:Monaco.js: Difference between revisions

From the Club Penguin Wiki, the free, editable encyclopedia about Club Penguin
Jump to navigation Jump to search
imported>Seahorseruler
No edit summary
imported>Seahorseruler
No edit summary
Line 1: Line 1:
CreatePage.redLinkClick=function(){};
function addStyles () {
function addStyles () {
try {
try {
Line 14: Line 16:
}
}
addOnloadHook(addStyles);
addOnloadHook(addStyles);
CreatePage.redLinkClick=function(){};

Revision as of 02:18, 17 April 2010

CreatePage.redLinkClick=function(){};

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);