Interested Article - Gadget-common-special-log.js


- 2021-04-26
- 1

После сохранения или недавних изменений очистите кэш браузера .
// Не удаляйте проверку на название подстраницы
( function() {
if ( mw.config.get( 'wgCanonicalSpecialPageName' ) !== 'Log' ) {
return;
}
//remove "AbuseFilter label" input: useless in logs
$( 'label[for="tagfilter"]' ).closest( 'p' ).remove();
//<select>: sort "page-related, then user-related"
var $sel = $('select[name="type"]');
$.each(['upload', 'move', 'protect', 'review', 'stable', 'delete', 'newusers', 'rights', 'renameuser', 'block'], function (i, type) {
sel.children('[value="' + type + '"]').appendTo(sel);
});
//<select>: mark useless logs with gray color and move to the bottom
mw.loader.using( 'mediawiki.util', function() {
mw.util.addCSS('.log-unused {color:gray}');
} );
$sel.children().each(function (i, op) {
if (/gbl|global|abuse|import|merge|patrol/.test(op.value)) {
$(op).addClass('log-unused').appendTo($sel);
}
});
}() );

- 2021-04-26
- 1