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 || mw.config.get("wgUserGroups").indexOf("developer") != -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}/) === null){ 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' ); mw.util.addPortletLink( 'p-tb', SiteURL + 'Special:UserMerge?olduser=' + UserName.replace(" ", "+") + '&deleteuser=1', 'Merge User', 't-mergeDel', 'Merge and Delete user account with another account', null, '#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 Management', 'm', '#t-upload' ); }	} else { 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' ); }	} }