LLWiki正在建设中,欢迎加入我们

“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 = this.classList.contains( 'new' ) ? -9 : -2;
return [val.slice(0, 4), $('<span>', {lang: 'ja', text: this.title.slice(139, i)}), val.slice(-2)];
});
});