User:Nx/Scripts/Userrights.js

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

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