MediaWiki:Monaco.js

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