“MediaWiki:Gadget-site-shared.js”的版本间差异

无编辑摘要
 
const lcCats = ["Μ's", 'Lily white', 'JQuery'],
author = /^[創]作者:/;
mw.hook( 'wikipage.categories' ).add(function($content) {
/**
$content.children( '#mw-normal-catlinks' ).find('a')
.filter(function() { return author.test( this.textContent ); }).html(function(_, val) {
const i =return [val.indexOfslice(0, 4), $('<span>', {lang: 'ja', text: this.title.slice(13)})];
return [val.slice(0, i + 1), $('<span>', {lang: 'ja', text: this.title.slice(i + 10)})];
});
});
16,874

个编辑