MediaWiki:Gadget-OnlineAdmins.js: Difference between revisions
From Test Wiki
Content deleted Content added
m PB2008 moved page User:PB2008/OnlineAdmins.js to MediaWiki:Gadget-OnlineAdmins.js without leaving a redirect Tags: Mobile edit Mobile web edit |
fix Tag: Manual revert |
||
| (5 intermediate revisions by 2 users not shown) | |||
| Line 4: | Line 4: | ||
'p-personal', |
'p-personal', |
||
'#', |
'#', |
||
' |
'Admins', |
||
't-onlineadmin', |
't-onlineadmin', |
||
'Seek help from admins.', |
'Seek help from admins.', |
||
| Line 87: | Line 87: | ||
}; |
}; |
||
if (admins.length > 0) { |
if (admins.length > 0) { |
||
var adminsstring = ['<center><p><b>Online |
var adminsstring = ['<center><p><b>Online Administrators:</b></p></center>']; |
||
if (admins.length > 0) { |
if (admins.length > 0) { |
||
adminsstring.push('<p style="word-break:break-all;">There are currently ' + admins.length + ' |
adminsstring.push('<p style="word-break:break-all;">There are currently ' + admins.length + ' Administrator(s) <br> online:'); |
||
$.each(admins, function(i, e) { |
$.each(admins, function(i, e) { |
||
adminsstring.push(userlink(e)); |
adminsstring.push(userlink(e)); |
||
| Line 98: | Line 98: | ||
mw.notify($(adminsstring.join(''))); |
mw.notify($(adminsstring.join(''))); |
||
} else { |
} else { |
||
mw.notify('Sorry! There are |
mw.notify('Sorry! There are no Administrators online.'); |
||
} |
} |
||
}).fail(function () { |
}).fail(function () { |
||
| Line 196: | Line 196: | ||
}; |
}; |
||
if (bureaucrats.length > 0) { |
if (bureaucrats.length > 0) { |
||
var adminsstring = ['<center><p><b> |
var adminsstring = ['<center><p><b>Online Bureaucrats:</b></p></center>']; |
||
if (bureaucrats.length > 0) { |
if (bureaucrats.length > 0) { |
||
adminsstring.push('<p style="word-break:break-all;">There are currently ' + bureaucrats.length + ' |
adminsstring.push('<p style="word-break:break-all;">There are currently ' + bureaucrats.length + ' Bureaucrat(s) <br>online:'); |
||
$.each(bureaucrats, function(i, e) { |
$.each(bureaucrats, function(i, e) { |
||
adminsstring.push(userlink(e)); |
adminsstring.push(userlink(e)); |
||
| Line 206: | Line 206: | ||
mw.notify($(adminsstring.join(''))); |
mw.notify($(adminsstring.join(''))); |
||
} else { |
} else { |
||
mw.notify('Sorry! There are no |
mw.notify('Sorry! There are no Bureaucrats online.'); |
||
} |
} |
||
}).fail(function () { |
}).fail(function () { |
||
| Line 304: | Line 304: | ||
}; |
}; |
||
if (stewards.length > 0) { |
if (stewards.length > 0) { |
||
var adminsstring = ['<center><p><b> |
var adminsstring = ['<center><p><b>Online Stewards:</b></p></center>']; |
||
if (stewards.length > 0) { |
if (stewards.length > 0) { |
||
adminsstring.push('<p style="word-break:break-all;">There are currently ' + steward(s).length + ' |
adminsstring.push('<p style="word-break:break-all;">There are currently ' + steward(s).length + ' Steward(s) <br>online:'); |
||
$.each(bureaucrats, function(i, e) { |
$.each(bureaucrats, function(i, e) { |
||
adminsstring.push(userlink(e)); |
adminsstring.push(userlink(e)); |
||
| Line 314: | Line 314: | ||
mw.notify($(adminsstring.join(''))); |
mw.notify($(adminsstring.join(''))); |
||
} else { |
} else { |
||
mw.notify('Sorry! There are no |
mw.notify('Sorry! There are no Stewards online.'); |
||
} |
} |
||
}).fail(function () { |
}).fail(function () { |
||