User:EpochFail/utilities.js

function importCSS(page) { var uri = mw.config.get('wgScript') + '?title=' + encodeURIComponent(page.replace(/ /g,'_')).replace('%2F','/').replace('%3A',':') + '&action=raw&ctype=text/css'; cssLink = document.createElement("link"); cssLink.rel = "stylesheet"; cssLink.type = "text/css"; cssLink.href = uri document.getElementsByTagName("head")[0].appendChild(cssLink); return cssLink; }