Jump to content

User:Thedjatclubrock/utilities.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
//change the 'personal links'
function changelinks() {
    if(!document.getElementById) return;
    mw.util.addPortletLink('p-personal', wgArticlePath.replace(/\$1/, 'User:Thedjatclubrock/monobook.js'),
        'Monobook', 'pt-monobook', 'monobook', null, document.getElementById('pt-logout'));
    mw.util.addPortletLink('p-personal', wgArticlePath.replace(/\$1/, 'Special:Recentchanges'),
        'Recent', 'pt-RC', 'Recent changes', null, document.getElementById('pt-logout'));
    mw.util.addPortletLink('p-personal', wgArticlePath.replace(/\$1/, 'Special:Newpages'),
        'New', 'pt-NP', 'New pages', null, document.getElementById('pt-logout'));
    mw.util.addPortletLink('p-personal', wgArticlePath.replace(/\$1/, 'Category:Candidates for speedy deletion#Pages_in_category'),
        'CSD', 'pt-CSD', 'CSD', null, document.getElementById('pt-logout'));
    document.getElementById('pt-mytalk').firstChild.innerHTML = 'Talk ';
    document.getElementById('pt-preferences').firstChild.innerHTML = 'Options';
    document.getElementById('pt-watchlist').firstChild.innerHTML = 'Watchlist';
    document.getElementById('pt-mycontris').firstChild.innerHTML = 'Contribs';
    document.getElementById('pt-logout').firstChild.innerHTML = 'Bye Bye :)';
    if(document.getElementById('ca-edit'))
        document.getElementById('ca-edit').firstChild.innerHTML = 'Edit!';
}