MediaWiki:Gadget-SysopTools.js

if (mw.config.get("wgNamespaceNumber") === 2 || mw.config.get("wgNamespaceNumber") === 3){ var SiteURL = "http://ddowiki.com/page/"; var UserName = mw.config.get("wgTitle"); if(UserName.indexOf("/") != -1){ UserName = UserName.substr(0, UserName.indexOf("/")); }   if(!UserName.match(/[0-2]?[\d]{1,2}\.[0-2]?[\d]{1,2}\.[0-2]?[\d]{1,2}\.[0-2]?[\d]{1,2}/)){ mw.util.addPortletLink( 'p-tb', SiteURL + "Special:RenameUser?oldusername=" + UserName.replace(" ", "+"), 'Rename', 't-renameuser', 'Rename User', 'm', '#t-upload' ); mw.util.addPortletLink( 'p-tb', SiteURL + "Special:UserRights/" + UserName, 'User Rights', 't-userrights', 'User Rights Managment', 'm', '#t-upload' ); }   mw.util.addPortletLink( 'p-tb', SiteURL + "Special:CheckUser?user=" + UserName, 'Check IP', 't-checkIP', 'Check IP address', 'm', '#t-upload' ); }