注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google ChromeFirefoxMicrosoft EdgeSafari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。
/* some code from [[User:Sun00217/現在我可以搞破壊了嗎.js]] */

let NOM_log = (function (t) {
	console.log('[NOMcheck] ' + t);
})

(function (){

if (mw.config.get('wgNamespaceNumber') != 0) {
	NOM_log("Not article, not loading FAcheck.js!");
	return;
}

var lang = mw.config.get('wgUserLanguage');

function wgCtUXS (wg, hans, hant, en) {
    var ret = {
        'zh': hant ,
        'zh-hans': hans,
        'zh-hant': hant,
        'zh-cn': hans,
        'zh-sg': hans,
        'zh-my': hans,
        'zh-tw': hant,
        'zh-hk': hant,
        'zh-mo': hant,
        'en': en
    };
    return ret[wg] || en || hans || hant ;
}

function wgULS (hans, hant, en) {
    return wgCtUXS(lang, hans, hant, en);
}

var api = new mw.Api();
var Report = wgULS('(','(','&nbsp;(') + '<a href="/wiki/User_talk:Emojiwiki">' + wgULS(
    '报告误判',
    '報告誤判',
    'Report misjudgments'
) + '</a>&nbsp;&#124;&nbsp;<a href="/wiki/User_talk:Emojiwiki/module/NOMcheck.js">' + wgULS(  
    '已知问题',
    '已知問題',
    'Known Problems'
) + '</a>' + wgULS(')',')',')');

var aname = mw.config.get('wgPageName');
var anameh = mw.html.escape(aname);

/* PR */ (function (){
api.get( {
    action: 'parse',
    page: 'Wikipedia:同行评审/提案区',
    prop: 'wikitext',
    formatversion: 2,
    errorformat: 'html',
} ).done( function ( data ) {
	NOM_log('Requested data from PR page');
    if ("errors" in data) {
    	mw.notify(wgULS(
    		'查询同行评审资料时发生错误',
    		'查詢同行評審資料時發生錯誤',
    		'Error while checking featured article data'
    	));
    	return;
    }
    var wtext = data.parse.wikitext;
    var aname_s = "{{article|" + aname + "}}";
    if (wtext.includes(aname_s.replace("_"," ")) || wtext.includes(aname_s.replace(" ","_"))) {
    	NOM_log('Found in PR page');
    	$("#bodyContent").append('<div class="catlinks">' + wgULS(
    		'《' + anameh + '》正在進行<a href="/wiki/Wikipedia:同行评审">同行评审</a>,欢迎<a href="/wiki/Wikipedia:同行评审">参与评审</a>。',
    		'《' + anameh + '》正在進行<a href="/wiki/Wikipedia:同行评审">同行評審</a>,歡迎<a href="/wiki/Wikipedia:同行评审">參與評審</a>。',
    		'<i>' + anameh + '</i> is having a <a href="/wiki/Wikipedia:同行评审">Peer Review</a>, welcome to <a href="/wiki/Wikipedia:同行评审">help us review</a>.'
    	) + Report + '</div>');
    }
} );
})();

/* FA */ (function (){
api.get( {
    action: 'parse',
    page: 'Wikipedia:典范条目评选/提名区',
    prop: 'wikitext',
    formatversion: 2,
    errorformat: 'html',
} ).done( function ( data ) {
	NOM_log('Requested data from FA page');
    if ("errors" in data) {
    	mw.notify(wgULS(
    		'查询典范条目资料时发生错误',
    		'查詢典範條目資料時發生錯誤',
    		'Error while checking featured article data'
    	));
    	return;
    }
    var wtext = data.parse.wikitext;
    var aname_s = "{{article|" + aname + "}}";
    if (wtext.includes(aname_s.replace("_"," ")) || wtext.includes(aname_s.replace(" ","_"))) {
    	NOM_log('Found in FA page');
    	$("#bodyContent").append('<div class="catlinks">' + wgULS(
    		'《' + anameh + '》正在评选或重审<a href="/wiki/Wikipedia:典范条目">典范条目</a>资格,欢迎<a href="/wiki/Wikipedia:典范条目评选">参与评选或重审</a>。',
    		'《' + anameh + '》正在評選或重審<a href="/wiki/Wikipedia:典范条目">典範條目</a>資格,歡迎<a href="/wiki/Wikipedia:典范条目评选">參與評選或重審</a>。',
    		'<i>' + anameh + '</i> is determining is it a <a href="/wiki/Wikipedia:典范条目">Featured Article</a> or not, welcome to <a href="/wiki/Wikipedia:典范条目评选">join the vote</a>.'
    	) + Report + '</div>');
    }
} );
})();

/* FL */ (function (){
api.get( {
    action: 'parse',
    page: 'Wikipedia:特色列表评选/提名区',
    prop: 'wikitext',
    formatversion: 2,
    errorformat: 'html',
} ).done( function ( data ) {
	NOM_log('Requested data from FL page');
    if ("errors" in data) {
    	mw.notify(wgULS(
    		'查询特色列表资料时发生错误',
    		'查詢特色列表資料時發生錯誤',
    		'Error while checking featured article data'
    	));
    	return;
    }
    var wtext = data.parse.wikitext;
    var aname_s = "{{article|" + aname + "}}";
    if (wtext.includes(aname_s.replace("_"," ")) || wtext.includes(aname_s.replace(" ","_"))) {
    	NOM_log('Found in FL page');
    	$("#bodyContent").append('<div class="catlinks">' + wgULS(
    		'《' + anameh + '》正在评选或重审<a href="/wiki/Wikipedia:特色列表">特色列表</a>资格,欢迎<a href="/wiki/Wikipedia:特色列表评选">参与评选或重审</a>。',
    		'《' + anameh + '》正在評選或重審<a href="/wiki/Wikipedia:特色列表">特色列表</a>資格,歡迎<a href="/wiki/Wikipedia:特色列表评选">參與評選或重審</a>。',
    		'<i>' + anameh + '</i> is determining is it a <a href="/wiki/Wikipedia:特色列表">Featured List</a> or not, welcome to <a href="/wiki/Wikipedia:特色列表评选">join the vote</a>.'
    	) + Report + '</div>');
    }
} );
})();

/* GA */ (function (){
api.get( {
    action: 'parse',
    page: 'Wikipedia:優良條目評選/提名區',
    prop: 'wikitext',
    formatversion: 2,
    errorformat: 'html',
} ).done( function ( data ) {
	NOM_log('Requested data from GA page');
    if ("errors" in data) {
    	mw.notify(wgULS(
    		'查询优良条目资料时发生错误',
    		'查詢優良條目資料時發生錯誤',
    		'Error while checking good article data'
    	));
    	return;
    }
    var wtext = data.parse.wikitext;
    var aname_s = "{{article|" + aname + "}}";
    if (wtext.includes(aname_s.replace("_"," ")) || wtext.includes(aname_s.replace(" ","_"))) {
    	NOM_log('Found in GA page');
    	$("#bodyContent").append('<div class="catlinks">' + wgULS(
    		'《' + anameh + '》正在评选或重审<a href="/wiki/Wikipedia:優良條目">优良条目</a>资格,欢迎<a href="/wiki/Wikipedia:優良條目評選">参与评选或重审</a>。',
    		'《' + anameh + '》正在評選或重審<a href="/wiki/Wikipedia:優良條目">優良條目</a>資格,歡迎<a href="/wiki/Wikipedia:優良條目評選">參與評選或重審</a>。',
    		'<i>' + anameh + '</i> is determining is it a <a href="/wiki/Wikipedia:優良條目">Good Article</a> or not, welcome to <a href="/wiki/Wikipedia:優良條目評選">join the vote</a>.'
    	) + Report + '</div>');
    }
} );
})();

/* DYK */ (function (){
api.get( {
    action: 'parse',
    page: 'Wikipedia:新条目推荐/候选',
    prop: 'wikitext',
    formatversion: 2,
    errorformat: 'html',
} ).done( function ( data ) {
	NOM_log('Requested data from DYK page');
    if ("errors" in data) {
    	mw.notify(wgULS(
    		'查询新条目推荐资料时发生错误',
    		'查詢新條目推薦資料時發生錯誤',
    		'Error while checking DYK data'
    	));
    	return;
    }
    var wtext = data.parse.wikitext;
    var aname_s = "[[" + aname + "|";
    if (wtext.includes(aname_s.replace("_"," ")) || wtext.includes(aname_s.replace(" ","_"))) {
    	NOM_log('Found in DYK page');
    	$("#bodyContent").append('<div class="catlinks">' + wgULS(
    		'《' + anameh + '》正在评选<a href="/wiki/Wikipedia:新条目推荐/候选">成为首页「你知道吗?」栏目条目</a>或等候展示,欢迎<a href="/wiki/Wikipedia:新条目推荐/候选">参与评选</a>。',
    		'《' + anameh + '》正在評選<a href="/wiki/Wikipedia:新条目推荐/候选">成爲首頁「你知道嗎?」欄目條目</a>或等候展示,歡迎<a href="/wiki/Wikipedia:新条目推荐/候选">參與評選</a>。',
    		'<i>' + anameh + '</i> is nominating to be a <a href="/wiki/Wikipedia:新条目推荐/候选">"Did you know?" article to display on the Main Page</a> or waiting for displaying, welcome to <a href="/wiki/Wikipedia:新条目推荐/候选">join the vote</a>.'
    	) + Report + '</div>');
    }
} );
})();




})();