User:Void/findInactiveSysops.js: Difference between revisions

m
Per removal. Consul action
(use regex instead to actually replace all instances)
m (Per removal. Consul action)
 
(14 intermediate revisions by 3 users not shown)
Line 2:
//<nowiki>
//This script automates the process of finding inactive sysops.
//Warning: the script will replace the contents of the page you are currently viewing when you click the link at the top right of the page.
//Output is in the format of "[[User:Example|Example]] || [[Special:PermanentLink/1234|timestamp]] || [[Special:Log/Example|timestamp]]"
mw.loader.using(['oojs-ui', 'mediawiki.util']).done( function () {
Line 93 ⟶ 92:
var checked = 0;
var inactive = [];
var checkList = [];
var total = 0;
 
// Get user list
Line 124 ⟶ 125:
function filterUsers ( userlist ) {
var userstring = userlist.toString();
var exempt = ["John", "Void", "NDKilla", "Reception123", "Revi", "Southparkfan", "Abuse filter", "Void-bot", "VoidwalkerZppix", "PaladoxRhinosF1", "ZppixMediaWiki message delivery", "MirahezeBotsMediaWiki default", "RhinosF1Babel AutoCreate", "MediaWikiDmehus", message"Revibot", delivery"Delete page script", "BonnedavMove page script", "BabelFlow AutoCreatetalk page manager", "Universal Omega", "HeartsDo", "MacFan4000"];
 
for ( i = 0; i < exempt.length; i++ ) {
Line 130 ⟶ 131:
}
 
var reducedListcheckList = userstring.split( "," );
for ( xtotal = 0; x < reducedListcheckList.length; x++ ) {
checkUser( reducedList[x], reducedListcheckList.lengthpop() );
}
}
 
function checkUser( user, total ) {
$.getJSON(
mw.util.wikiScript( 'api' ),
Line 176:
 
checked++;
progressBar.setProgress( parseInt(checked (checked/ total) * 100 ) );
 
if( checkedcheckList.length ==> total0 ) {
checkUser( checkList.pop() );
} else {
listInactiveUsers();
}