User:Christopher Costello/monobook.css

function addArticle { window.location.href = 'http://pediapress.com/api/add-article/?return=1&base_url=' + wgServer + wgScriptPath + '&title=' + wgTitle; } function addCategory { window.location.href = 'http://pediapress.com/api/add-category/?return=1&base_url=' + wgServer + wgScriptPath + '&title=' + wgTitle; } function addPediaPressLinks { if (wgNamespaceNumber == 14) { addPortletLink ('p-personal', 'javascript:addCategory', 'add category'); } else { addPortletLink ('p-personal', 'javascript:addArticle', 'add article'); } addPortletLink ('p-personal', 'http://pediapress.com/collection/', 'my collection'); } addOnloadHook(addPediaPressLinks);