User:Nx/Scripts/UserRename.js

importScript('User:Nx/Scripts/ModifySidebar.js');

function CustomizeModificationsOfSidebar_urename { if (wgNamespaceNumber == 2 || wgNamespaceNumber == 3) { username = wgPageName.replace(/\/.*$/, ''); if (wgPageName == username) { username = username.substring(username.indexOf(':') + 1); ModifySidebar("add", "toolbox", "Rename user", "http://rationalwiki.com/wiki/Special:RenameUser/"+username); } } } addOnloadHook(CustomizeModificationsOfSidebar_urename);