MediaWiki:Gadget-OnlineAdmins.js: Difference between revisions
From Test Wiki
Content deleted Content added
No edit summary |
No edit summary |
||
| Line 4: | Line 4: | ||
'p-personal', |
'p-personal', |
||
'#', |
'#', |
||
'Online |
'Online users with advanced rights', |
||
't-onlineadmin', |
't-onlineadmin', |
||
'Seek help from these users. Note: The action query tends to be quite long when the number of recent edits was high. This is a currrently unsolved problem.', |
|||
'Seek help from these users', |
|||
'', |
'', |
||
'#pt-userpage' |
'#pt-userpage' |
||
| Line 28: | Line 28: | ||
time = new Date(); |
time = new Date(); |
||
rcstart = time.toISOString(); |
rcstart = time.toISOString(); |
||
time.setMinutes(time.getMinutes() - |
time.setMinutes(time.getMinutes() - 15); |
||
rcend = time.toISOString(); |
rcend = time.toISOString(); |
||
| Line 107: | Line 107: | ||
if (admins.length + rollbackers.length + patrollers.length > 0) { |
if (admins.length + rollbackers.length + patrollers.length > 0) { |
||
var adminsstring = ['<p><b>Current users with advanced rights</b></p>']; |
var adminsstring = ['<center><p><b>Current online users with advanced rights</b></p></center>']; |
||
if (admins.length > 0) { |
if (admins.length > 0) { |
||
adminsstring.push('<p style="word-break:break-all;">There are currently ' + admins.length + ' administrators online:'); |
adminsstring.push('<p style="word-break:break-all;">There are currently ' + admins.length + ' administrators <br> online:'); |
||
$.each(admins, function(i, e) { |
$.each(admins, function(i, e) { |
||
adminsstring.push(userlink(e)); |
adminsstring.push(userlink(e)); |
||
| Line 118: | Line 118: | ||
if (patrollers.length > 0) { |
if (patrollers.length > 0) { |
||
adminsstring.push('<p style="word-break:break-all;">There are currently ' + patrollers.length + ' patrollers online:'); |
adminsstring.push('<p style="word-break:break-all;">There are currently ' + patrollers.length + ' patrollers <br>online:'); |
||
$.each(patrollers, function(i, e) { |
$.each(patrollers, function(i, e) { |
||
adminsstring.push(userlink(e)); |
adminsstring.push(userlink(e)); |
||
| Line 126: | Line 126: | ||
if (rollbackers.length > 0) { |
if (rollbackers.length > 0) { |
||
adminsstring.push('<p style="word-break:break-all;">There are currently ' + rollbackers.length + ' rollbackers online'); |
adminsstring.push('<p style="word-break:break-all;">There are currently ' + rollbackers.length + ' rollbackers <br>online'); |
||
$.each(rollbackers, function(i, e) { |
$.each(rollbackers, function(i, e) { |
||
adminsstring.push(userlink(e)); |
adminsstring.push(userlink(e)); |
||
| Line 135: | Line 135: | ||
mw.notify($(adminsstring.join(''))); |
mw.notify($(adminsstring.join(''))); |
||
} else { |
} else { |
||
mw.notify(' |
mw.notify('Sorry! You cannot find help currently as there are no users online'); |
||
} |
} |
||
}).fail(function () { |
}).fail(function () { |
||