w:User:Cobaltcigs/IllWill

{{collapsible section|title=Source code|content=

{{#tag:syntaxhighlight|{{{{FULLPAGENAME}}.js}}|lang=javascript}}

}}

IllWill.js does the following:

  1. Collects a list of all red links on a page,
  2. Searches for them on wikidata,
  3. Presents possible matches to the user with Q-number and short description,
  4. Fetches site links for each selected wikidata item,
  5. Formats each language code + title using the "interlanguage link" template (a.k.a. {{tl|ill}}).
  6. Replaces the red link with a transclusion of this {{tl|ill}}

class="wikitable" style="font-size:smaller;"

|+ Example (fictitious)

! Input !! Wikidata item !! Site links !! Output

John Johnsonson

John Johnsonson

| Q99999999: Asgardian film and stage actor

| {{ubl|class=nowrap|:de:John Johnsonson (Schauspieler)|:fr:John Johnsonson (acteur)}}

|