2,513
edits
(revisions property without rvslots is depreciated) |
|||
(22 intermediate revisions by 3 users not shown) | |||
Line 2:
//<nowiki>
//This script automates the process of finding inactive sysops.
//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 88 ⟶ 87:
windowManager.addWindows([ inactiveUsersProc ]);
$('
windowManager.openWindow(inactiveUsersProc);
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
for ( i = 0; i < exempt.length; i++ ) {
Line 130 ⟶ 131:
}
}▼
}
function checkUser( user
$.getJSON(
mw.util.wikiScript( 'api' ),
Line 158:
var activeLogs, activeTribs, active, tribsInfo;
if( typeof( logsData[0]
activeLogs = compareDates( logsData[0].timestamp, "logs" );
} else {
Line 176:
checked++;
progressBar.setProgress( parseInt(
if(
checkUser( checkList.pop() );
} else {
listInactiveUsers();
}
Line 217 ⟶ 219:
if( dataType === "logs" ) {
date = data.slice( 0, data.indexOf('T') );
date = date.replace(
} else if( dataType === "tribs" ) {
date = data.slice( data.indexOf('|') + 1, data.indexOf('T') );
date = date.replace(
}
Line 247 ⟶ 249:
}
var logsInfo
if( logsArray[0] !== undefined ) {
logsInfo = logsInfo.slice( 0, logsInfo.indexOf("T") );▼
logsInfo =
▲ logsInfo = logsInfo.slice( 0, logsInfo.indexOf("T") );
logsInfo = "[[Special:Log/" + userName + "|" + logsInfo + "]]";
} else {
logsInfo = 'None';
▲ }
textPanel.$element.append( "<li>" + userLink + " || " + tribsInfo + " || " + logsInfo + "</li>" );
|