16,874
个编辑
LLWiki正在建设中,欢迎加入我们!
小 |
小 |
||
action = mw.config.get('wgAction'),
editable = mw.config.get( 'wgIsProbablyEditable' ),
username = mw.config.get('wgUserName'),
$body = $('body');
/**
* @Function: 点击其他用户主页面的红链不会进入创建页面
* @Dependencies: mediawiki.
*/
$content.find( '.new' ).attr('href', function(i, val) {
const
if (!query) { return; } // 特殊页面
// 不处理非用户空间或用户子页面
if (title.namespace != 2 ||
return title.getUrl();
});
/**
if (['edit', 'submit'].includes(action) && !editable && $('.editRequest').length == 1) {▼
* @Function: 生成完整的编辑请求链接
var ele = $('.editRequest > a'),▼
* @Dependencies: mediawiki.util, mediawiki.Title
href = new mw.Uri(ele.attr('href')),▼
*/
date = new Date();
href.query.preloadtitle = '编辑请求' + ' - ' +
$ele.attr('href', href.toString());
}
|