MediaWiki:UserRightsRecord/code.js

// ');

for (var key in stuff) { keysOuter.push(key); }       keysOuter.sort;

for (var i = 0; i < keysOuter.length; i++) { keysInner = []; for (var key in stuff[keysOuter[i]]) { keysInner.push(key); }           keysInner.sort;

for (var j = 0; j < keysInner.length; j++) { item = stuff[keysOuter[i]][keysInner[j]];

if (mode === 'rights') { if (j === 0) { $urr.append('' +                          keysOuter[i] + ' ');

$('#urr-toc').append('' + keysOuter[i] + ''); }

addstr = '' + keysInner[j].substring(5) + ': ';

for (var k = 0; k < item.length; k++) { if (k > 0) { addstr += ', '; } addstr += item[k][0] + ' – ' + item[k][1]; }                   addstr += '';

$('#urr-active').append(addstr); } else if (mode === 'users') { if (j === 0) { $urr.append('' + keysOuter[i].substring(5) +                           ': '); } else { $('#urr-active').append(', '); }

addstr = keysInner[j] + ' (';                   for (var k = 0; k < item.length; k++) {                        if (k > 0) { addstr += ', '; }                        addstr += item[k][0] + ' &dash; ' + item[k][1];                    }                    addstr += ')';

$('#urr-active').append(addstr); }           }            $('#urr-active').removeAttr('id'); }

$('#urr-toc').removeAttr('id'); //for multiple instances on one page }

//One line to call them all getData(start, putResults); }); //