User:Technical 13/SandBox/ACCHelp.js

/* INITIALIZE VARIABLES */ if (typeof(userACC) === 'undefined'){ var userACC = mw.config.get( 'wgUserName' ).replace(" ", "_"); } var Ucheck = "✔", Ucross = "✘", tickGood = ' &#x2714; ', tickBad = ' &#x2718; ';

/* Add a link to the ACC tool in the sidebar toolbox */ $.ajax({	url: 'https://accounts.wmflabs.org/api.php?action=status',	dataType: 'xml',	success: function(ACCstatus) {		var requests = parseInt($(ACCstatus).find('status').attr('open'), 10);		var requestsTotal = requests;		var requestsAdmin = parseInt($(ACCstatus).find('status').attr('admin'), 10);		var requestsCU = parseInt($(ACCstatus).find('status').attr('checkuser'), 10);		var requestsHold = parseInt($(ACCstatus).find('status').attr('hold'), 10);		var requestsProxy = parseInt($(ACCstatus).find('status').attr('proxy'), 10);		if(mw.config.get('wgUserGroups').indexOf('accountcreator') !== -1){			requestsTotal += requestsAdmin;		}		if(mw.config.get('wgUserGroups').indexOf('checkuser') !== -1){			requestsTotal += requestsCU;		}		if(requests > 0){			mw.util.addPortletLink('p-tb', '//accounts.wmflabs.org/acc.php?tplUsername=' + userACC, requestsTotal + ' requested accounts!', 'p-acc', 'Go to the Account Creation Interface\nOpen requests:\t\t\t' + requests + '\nFlagged user needed:\t\t' + requestsAdmin + '\nCheckuser needed:\t\t' + requestsCU + '\nOn hold:\t\t\t\t\t' + requestsHold + '\nProxy check needed:\t\t' + requestsProxy); }	},	error: function(failure){ console.error('Request error returned object: %o', failure); } });

/* IP */ /* User talk */// User:Technical 13/Scripts/ACCHelp/User talk.js mw.loader.load( '//en.wikipedia.org/w/index.php?title=User:Technical 13/Scripts/ACCHelp/User talk.js&action=raw&ctype=text/javascript' ); /* Contributions */// User:Technical 13/Scripts/ACCHelp/Contributions.js mw.loader.load( '//en.wikipedia.org/w/index.php?title=User:Technical 13/Scripts/ACCHelp/Contributions.js&action=raw&ctype=text/javascript' ); /* I don't remember */ /* Global contributions */ /* BlockList */// User:Technical 13/Scripts/ACCHelp/Block list.js mw.loader.load( '//en.wikipedia.org/w/index.php?title=User:Technical 13/Scripts/ACCHelp/Block list.js&action=raw&ctype=text/javascript' ); /* Block log */// User:Technical 13/Scripts/ACCHelp/Block log.js mw.loader.load( '//en.wikipedia.org/w/index.php?title=User:Technical 13/Scripts/ACCHelp/Block log.js&action=raw&ctype=text/javascript' ); /* GlobalBlockList */// User:Technical 13/Scripts/ACCHelp/Global block list.js mw.loader.load( '//en.wikipedia.org/w/index.php?title=User:Technical 13/Scripts/ACCHelp/Global block list.js&action=raw&ctype=text/javascript' ); /* Global IP block log */// User:Technical 13/Scripts/ACCHelp/Global block log.js mw.loader.load( '//en.wikipedia.org/w/index.php?title=User:Technical 13/Scripts/ACCHelp/Global block log.js&action=raw&ctype=text/javascript' ); /* Whois */ /* AbuseLog */// User:Technical 13/Scripts/ACCHelp/Abuse log.js mw.loader.load( '//en.wikipedia.org/w/index.php?title=User:Technical 13/Scripts/ACCHelp/Abuse log.js&action=raw&ctype=text/javascript' );

/* Username */ /* User page */// User:Technical 13/Scripts/ACCHelp/User.js mw.loader.load( '//en.wikipedia.org/w/index.php?title=User:Technical 13/Scripts/ACCHelp/User.js&action=raw&ctype=text/javascript' ); /* User creation log */// User:Technical 13/Scripts/ACCHelp/Creation log.js mw.loader.load( '//en.wikipedia.org/w/index.php?title=User:Technical 13/Scripts/ACCHelp/Creation log.js&action=raw&ctype=text/javascript' ); /* SUL */ /* CentralAuth */// User:Technical 13/Scripts/ACCHelp/CentralAuth.js mw.loader.load( '//en.wikipedia.org/w/index.php?title=User:Technical 13/Scripts/ACCHelp/CentralAuth.js&action=raw&ctype=text/javascript' ); /* Listusers */// User:Technical 13/Scripts/ACCHelp/List users.js mw.loader.load( '//en.wikipedia.org/w/index.php?title=User:Technical 13/Scripts/ACCHelp/List users.js&action=raw&ctype=text/javascript' ); /* Mainspace search */// User:Technical 13/Scripts/ACCHelp/Search.js mw.loader.load( '//en.wikipedia.org/w/index.php?title=User:Technical 13/Scripts/ACCHelp/Search.js&action=raw&ctype=text/javascript' ); /* Google search */