wpbutton.onclick = () => {
let wptitle = wpinput.value || document.getElementById('form').value;
let wplang = document.getElementById('lang').value;
+ if (wplang == 'la') wplang = 'en'; // most likely presence of scientific names
let wpapi = `https://${wplang}.wikipedia.org/w/api.php`;
let wppage = wpapi+'?action=parse&format=json&origin=*&prop=text|langlinks&page='+wptitle;
fetch(wppage).then(res => res.json()).then(json => {
wpbutton.onclick = () => {
let wptitle = wpinput.value || document.getElementById('form').value;
let wplang = document.getElementById('lang').value;
- let wpurl = `https://${wplang}.wikipedia.org/wiki/${wptitle}`;
+ let wpurl =
+ wplang == 'la' ? `https://species.wikimedia.org/wiki/${wptitle}` :
+ `https://${wplang}.wikipedia.org/wiki/${wptitle}`;
window.open(wpurl, 'sheet-wikipedia').focus();
return false;
};
en => ["\N{REGIONAL INDICATOR SYMBOL LETTER G}\N{REGIONAL INDICATOR SYMBOL LETTER B}", 'english'],
eo => ['<span style="color:green">★</span>', 'esperanto'],
ru => ["\N{REGIONAL INDICATOR SYMBOL LETTER R}\N{REGIONAL INDICATOR SYMBOL LETTER U}", 'русский'],
+ la => ["\N{PUSHPIN}", 'latin'],
);
my @wordcols = pairkeys
my %wordcol = (