MediaWiki:Gadget-SysopTools.js

if (mw.config.get("wgNamespaceNumber") === 2 || mw.config.get("wgNamespaceNumber") === 3 && (mw.config.get("wgUserGroups").indexOf("ddowikivip") != -1 || mw.config.get("wgUserGroups").indexOf("bureaucrat") != -1 || mw.config.get("wgUserGroups").indexOf("steward") != -1)){ 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}/)){ if (mw.config.get("wgUserGroups").indexOf("bureaucrat") != -1){ mw.util.addPortletLink( 'p-tb', SiteURL + "Special:RenameUser?oldusername=" + UserName.replace(" ", "+"), 'Rename', 't-renameuser', 'Rename User', 'm', '#t-upload' ); }       if (mw.config.get("wgUserGroups").indexOf("ddowikivip") != -1 || mw.config.get("wgUserGroups").indexOf("bureaucrat") != -1 || mw.config.get("wgUserGroups").indexOf("steward") != -1){ mw.util.addPortletLink( 'p-tb', SiteURL + "Special:UserRights/" + UserName, 'User Rights', 't-userrights', 'User Rights Managment', 'm', '#t-upload' ); }   }    if (mw.config.get("wgUserGroups").indexOf("bureaucrat") != -1){ mw.util.addPortletLink( 'p-tb', SiteURL + "Special:CheckUser?user=" + UserName, 'Check IP', 't-checkIP', 'Check IP address', 'm', '#t-upload' ); } }