Bureaucrats, editor, Interface administrators, Administrators (Semantic MediaWiki), Curators (Semantic MediaWiki), Editors (Semantic MediaWiki), Administrators
47,390
edits
No edit summary |
No edit summary |
||
Line 7:
(function ($, mw, rs) {
var $sortables = $('.sortable[class*="autosort="]');
console.log('Found sortables:', $sortables);
if (!$sortables.length) return;
rs.autosort = function () {
Line 14 ⟶ 15:
matched = (' ' + $(this).attr('class') + ' ').match(/autosort=(\d+)[,-]{1}(a|d)/),
$sortCol = $this.find('> thead th:nth-child(' + matched[1] + ')');
console.log('Matched details:', matched);
if (matched[2] === 'd') {
// descending
|