User:Renesis/userlinks.js

function userspacify(page) { return 'User:'+wgUserName+'/'+page; } function getWikiLink(page, name) { return ''+(name?name:page)+''; }

function insertUserLink(page, name) { var newuserlink = document.createElement('LI'); newuserlink.id = 'pt-' + name.toLowerCase; newuserlink.innerHTML = getWikiLink(page, (name?name:page));

var talklink = document.getElementById('pt-mytalk'); talklink.parentNode.insertBefore(newuserlink, talklink); } function addUserLink(page, name) { addOnloadHook(function { insertUserLink(page, name); }); }