//on [[Special:Listusers]] the scripts adds users logs links, additionally on [[Special:Listusers/patroller]] links to users patrol logs
//usage: if (wgCanonicalNamespace == 'Special' && wgCanonicalSpecialPageName == 'Listusers') importScript('user:js/listuserslogs.js')
$(listUsersLogs)
function listUsersLogs(){
var content = document.getElementById('content')
var ul = content.getElementsByTagName('ul')[0]
if (!ul) return
var row, user, lis = ul.getElementsByTagName('li')
var isPatrol = (document.URL.indexOf('patroller') != -1)
var lnk = '<a href="'+ mw.config.get('wgServer') + mw.config.get('wgScript') + '?title=Special:Log&user='
for (var i=0; i<lis.length; i++){
row = lis[i].innerHTML
user = row.match (/>([^<]+)<\/a>/)
if (user) user = user[1]; else continue
row += '<small> (' + lnk + user + '">журналы</a>'
if (isPatrol) row += ', ' + lnk + user + '&type=patrol">патрулирование</a>'
row += ')</small>'
lis[i].innerHTML = row
}
}