varIllWill={};IllWill.css=["#ill-sandbox, #ill-row-sandbox { display: none !important; }",".ill-sitelinks a { display: block; white-space: nowrap; }",".illwill-ignore { text-decoration: line-through; color: gray; font-size: smaller; }",".ill-x { width: 24px; }",".ill-input, .ill-output { font-family: monospace; white-space: pre-wrap; }","#ill-buttons { text-align: right; white-space: nowrap; }","#ill-buttons input { margin-left: 3px; margin-right: 3px; font-size: smaller; }","#ill-table caption { background: lightgreen; }","#ill-help { font-size: smaller; }","#illwill { clear: both; }",".ill-na { font-style: italic; color: gray; font-size: smaller; }",".ill-input .ill-na, .ill-output .ill-na { display: block; }",].join("\n");IllWill.Version="1.0.5";IllWill.Attribution='created by <a target="_blank" href="/wiki/User:Cobaltcigs">cobaltcigs</a> (<a target="_blank" href="/wiki/User_talk:Cobaltcigs">talk</a>)';IllWill.CaptionHTML="IllWill.js (v. "+IllWill.Version+") \u2013 "+IllWill.Attribution;IllWill.LocalApi=location.href.split(/\/w(?:iki)?\//)[0]+"/w/api.php";IllWill.DataApi="https://wikidata.org/w/api.php";IllWill.LocalLang=mw.config.get("wgPageContentLanguage");IllWill.UrlLengthLimit=3600;// TODO: determine actual limitIllWill.HelpText='For each row, determine the correct wikidata item corresponding to the red link found in wikitext. This will import a full list of interwiki prefixes and titles to use with template <code>\x7B\x7B<a href="/wiki/Template:Ill">ill</a>\x7D\x7D</code> when replacing the regular red link. If none of the listed wikidata items are correct, uncheck the box in the first column to clear selection for that row, and no replacement will occur. Click "OK" when finished.';IllWill.Summary="added interlanguage links using IllWill.js";IllWill.SearchCb=[];IllWill.SiteLinks={};IllWill.Disambiguator=/ \(.*\)$/;var$textbox=$('#wpTextbox1');vareditform=document.getElementById("editform");IllWill.MakeWikidataLink=function(q,t){return'<a id="'+q+'-link" href="https://wikidata.org/wiki/'+q+'" target="_blank">'+t+'</a>';}IllWill.EscapeHTML=function(s){returns.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'");// a.k.a. "'"}IllWill.EscapeRegExp=function(s){returns.replace(/[.*+?^${}()|[\]\\]/g,'\\$&');}IllWill.Normalize=function(s){returns.normalize().replace(/[\s_]+/g," ").trim();}IllWill.NormEqual=function(a,b){a=IllWill.Normalize(a);b=IllWill.Normalize(b);return(a[0].toUpperCase()+a.substring(1))==(b[0].toUpperCase()+b.substring(1));}IllWill.MakeRegex=function(t){returnnewRegExp("\\[\\[\\s*"+IllWill.EscapeRegExp(t).replace(/\s/g,"[\\s_]+")+"\\s*(?:\\|[^\\[\\]]+)?\\]\\]","ig");}IllWill.Setup=function(){if(IllWill.SetupComplete)return;if(!["edit","submit"].includes(mw.config.get('wgAction')))return;varstyle=document.createElement("style");style.type="text/css";style.innerText=IllWill.css;document.head.appendChild(style);mw.util.addPortletLink('p-cactions',`#"interlanguage link" template (a.k.a.{{ill}}).Replaces the red link with a transclusion of this{{ill}}
Example (fictitious) Input Wikidata item Site links Output [[John Johnsonson (actor)|John Johnsonson]]Q99999999: Asgardian film and stage actor {{ill|John Johnsonson (actor)|lt=John Johnsonson|de|John Johnsonson (Schauspieler)|fr|John Johnsonson (acteur)}}Real example diff:Special:Diff/981601881.