Jump to content

User:Rei-artur/monobook.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Rei-artur (talk | contribs) at 20:06, 5 March 2006. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
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.
/* <nowiki> */

/* change the names of personal tools links and the edit tab */
function changelinks() {
    if(!document.getElementById) return;
    document.getElementById('pt-mytalk').firstChild.innerHTML = 'Talk page';
    document.getElementById('pt-preferences').firstChild.innerHTML = 'Preferences';
    document.getElementById('pt-watchlist').firstChild.innerHTML = 'Watchlist';
    document.getElementById('pt-mycontris').firstChild.innerHTML = 'Contributions';
    document.getElementById('pt-logout').firstChild.innerHTML = 'Log out';
    if(document.getElementById('ca-edit'))
        document.getElementById('ca-edit').firstChild.innerHTML = 'edit';
}

/* this function is used to add extra tabs and links */
function addlilink(tabs, url, name, id) {
    var na = document.createElement('a');
    na.href = url;
    na.id = id;
    na.appendChild(document.createTextNode(name));
    var li = document.createElement('li');
    li.appendChild(na);
    tabs.appendChild(li);
    return li;
}

/* add links to the sidebar toolbox */
function addtoolboxlinks() {
    var tb = document.getElementById('p-tb').getElementsByTagName('ul')[0];
    addlilink(tb, '/wiki/Special:Newpages', 'New pages', '');
    addlilink(tb, '/wiki/Category:Candidates_for_speedy_deletion', 'Speedy deletions', '');
    addlilink(tb, '/wiki/Wikipedia:Articles_for_deletion/Old', 'VfD backlog', '');
    addlilink(tb, '/wiki/Wikipedia:Vandalism_in_progress', 'Vandalism', '');
    addlilink(tb, '/wiki/Special:Blockip', 'Block IP', '');
    addlilink(tb, '/wiki/Wikipedia:Village_pump_%28all%29', 'Village pump', '');
    addlilink(tb, '/wiki/Wikipedia:Administrators%27_noticeboard', 'Noticeboard', '');
    addlilink(tb, '/wiki/Wikipedia:Administrators%27_noticeboard/Incidents', 'Incidents', '');
}


/* Go! */
window.onload = Main;
function Main() {
    changelinks();
    addtoolboxlinks()
    addpurge();
    addSinceTab();
    morelinks();
    LivePreviewInstall();
}

/* </nowiki> */