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

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

跳转到导航 跳转到搜索
/**
* @Function: 生成完整的编辑请求链接
* @Dependencies: mediawiki.util, mediawiki.TitleUri
*/
const $ele = $('.editRequest > a');
if (['edit', 'submit'].includes(action) && !editable && username && $ele.length) {
var href = new mw.Uri($ele.attr('href', function(i, val)), {
datereturn =mw.Uri( newval Date();.extend({ preloadtitle:
// 不能出现空格,否则会被转换为+
href.query.preloadtitle = '编辑请求' + ' - ' + username + ' (' + date.getFullYear() + '-' + date.getMonth() + '-' + date.getDate() + ')';
'编辑请求_-_' + username.replaceAll(' ', '_') + '_(' + new Date().toISOString().slice(0, 10) + ')'
$ele.attr('href', href }).toString());
});
}
});
 
/**
* @Function: 分类栏显示小写标题
*/
mw.hook( 'wikipage.categories' ).add(function($content) {
$content.find( 'a:contains("Μ\'s")' ).text(function(i, text) { return text.replace("Μ's", "μ's"); });