User:Xiplus/js/abuselog-links.js
外观
< User:Xiplus | js
注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google Chrome、Firefox、Microsoft Edge及Safari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。
if (mw.config.get('wgRelevantUserName') !== null) {
mw.util.addPortletLink(
'p-tb',
'/wiki/Special:滥用日志?wpSearchUser=' + mw.config.get('wgRelevantUserName'),
'用戶過濾器日誌',
't-userabuselog',
'',
'',
$('#t-blockip')
);
}
if (mw.config.get('wgCanonicalSpecialPageName') === 'AbuseLog' && mw.config.get("wgAbuseFilterVariables") && mw.config.get("wgAbuseFilterVariables")["user_name"]) {
mw.util.addPortletLink(
'p-tb',
'/wiki/Special:滥用日志?wpSearchUser=' + mw.config.get("wgAbuseFilterVariables")["user_name"],
'用戶過濾器日誌',
't-userabuselog',
'',
'',
$('#t-blockip')
);
}
if (mw.config.get('wgCanonicalSpecialPageName') === 'AbuseLog') {
if (mw.config.get("wgAbuseFilterVariables") && mw.config.get("wgAbuseFilterVariables")["page_prefixedtitle"]) {
mw.util.addPortletLink(
'p-tb',
'/wiki/Special:滥用日志?wpSearchTitle=' + mw.config.get("wgAbuseFilterVariables")["page_prefixedtitle"],
'此頁過濾器日誌',
't-abuselog',
'',
'',
$('#t-specialpages')
);
}
} else {
mw.util.addPortletLink(
'p-tb',
'/wiki/Special:滥用日志?wpSearchTitle=' + mw.config.get('wgPageName'),
'此頁過濾器日誌',
't-abuselog',
'',
'',
$('#t-specialpages')
);
}