User:Nmajdan/personallinks.js

////////////////////////////////////////// // // Modify personal links, add clock // //////////////////////////////////////////

function showTime {   var timerID; var now = new Date; var timeValue = now.toUTCString.replace(/GMT/, "UTC"); document.getElementById('utcdate').firstChild.innerHTML = timeValue; timerID = setTimeout('showTime', 100); }

function addClock {   var toplinks = document.getElementById('p-personal').getElementsByTagName('ul')[0]; addlilink(toplinks, '#', '', 'utcdate'); showTime; }

function changePersonalLinks {   if(!document.getElementById) return;

// remove the "my" bits document.getElementById('pt-mytalk').firstChild.innerHTML = 'talk'; document.getElementById('pt-preferences').firstChild.innerHTML = 'preferences'; document.getElementById('pt-watchlist').firstChild.innerHTML = 'watchlist'; document.getElementById('pt-mycontris').firstChild.innerHTML = 'contributions';

// add links to navigation box document.getElementById('n-sitesupport').parentNode.innerHTML += "Work Desk" + "Portal:CFB" + "Portal:OK" + "OU" + "OU Football</a></li>" + "<li id='WP:CFB'<a href='/wiki/WP:CFB'>WP:CFB</a></li>" + "<li id='WP:CFB RC'<a href='/wiki/Special:Recentchangeslinked/Category:College_football'>WP:CFB RC</a></li>" + "<li id='2007 Sooners'<a href='/wiki/2009_Oklahoma_Sooners_football_team'>2009 OU Sooners</a></li>" + "<li id='WP:OU'<a href='/wiki/WP:OU'>WP:OU</a></li>" + "<li id='editcount'><a href='http://tools.wikimedia.de/~interiot/cgi-bin/Tool1/wannabe_kate'>Edit Count</a></li>";

// add clock to top right hand corner //addClock; }

$(changePersonalLinks);