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"); alert(" " + UserName.match(/([0-2][\d]{0,2}\.){3}[0-2][\d]{0,2}/)); if(UserName.match(/([0-2][\d]{0,2}\.){3}[0-2][\d]{0,2}/) === "null"){ mw.util.addPortletLink( 'p-tb', SiteURL + "Special:RenameUser?oldusername=" + replace(UserName, " ", "+"), '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' ); }