Bureaucrats, editor, Interface administrators, Administrators (Semantic MediaWiki), Curators (Semantic MediaWiki), Editors (Semantic MediaWiki), Administrators
47,390
edits
No edit summary Tag: Manual revert |
No edit summary |
||
Line 1:
"use strict";
/**
* For autosorting sortable tables
* @example <>
*/
(function ($, mw, rs) {
matched = (' '
if (matched[2] === 'd') {
//
//
▲ $sortCol.click().click();
▲ mw.hook('gadget.autosort.sorted').fire($sortables);
▲ });
};▼
mw.hook('wikipage.content').add(function init() {▼
if ($('.jquery-tablesorter').length) {▼
▲ rs.autosort();
▲ } else {
// tablesorter plugin has not run yet; observe the first▼
// sortable table element and wait for the plugin to add▼
// the 'jquery-tablesorter' class to it▼
new MutationObserver(function(muts, obs) {▼
if (muts[0].target.classList.contains('jquery-tablesorter')) {▼
window.rs.autosort();▼
obs.disconnect();▼
}▼
}).observe($sortables[0], {▼
attributes: true,▼
attributeFilter: ['class'],▼
});▼
// only run once▼
mw.hook('wikipage.content').remove(init);▼
});
rs.autosort();
} else {
}(jQuery, mediaWiki, rswiki));▼
});
|