MediaWiki:Gadget-OnlineAdmins.js: Difference between revisions

From Test Wiki
Content deleted Content added
No edit summary
Code cleansing
Line 23: Line 23:
admins = [];
admins = [];


// 最近更改30分钟内的编辑用户
// Recent edits within 15 minutes
time = new Date();
time = new Date();
rcstart = time.toISOString();
rcstart = time.toISOString();
Line 141: Line 141:
patrollers = [];
patrollers = [];


//Recent edit within 15 minutes
// 最近更改30分钟内的编辑用户
time = new Date();
time = new Date();
rcstart = time.toISOString();
rcstart = time.toISOString();
Line 184: Line 184:
// 找到管理员,去除adminbot
// 找到管理员,去除adminbot
if ($.inArray('bot', user.groups) === -1) {
if ($.inArray('bot', user.groups) === -1) {
if ($.inArray('sysop', user.groups) > -1) {
admins[i] = user.name;
}
if ($.inArray('rollbacker', user.groups) > -1) {
rollbackers[i] = user.name;
}
if ($.inArray('patroller', user.groups) > -1) {
if ($.inArray('patroller', user.groups) > -1) {
patrollers[i] = user.name;
patrollers[i] = user.name;