User:氷点下/common.js

$(function { $("a[href*='/wiki/']").each(function { var text1 = $(this).text; mw.loader.using('mediawiki.api').then(function {  	var api = new mw.Api;    api.get({ action: 'query', prop: 'info', title: text1 }).done(function (data) { var color="color"; if ("-1" in data.query.pages) { color="red"; }else{ color="blue"; } 	});  });     $(this).after('jawikt'); }); });