Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
jumear authored Sep 8, 2024
1 parent eea6750 commit c7e549e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions iNatAPIv1_identifications.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,15 @@

let tbody = faddelem('tbody',table);
let associatedobs = [];
let urlobs = 'https://www.inaturalist.org/observations';
for (let i=0; i<results.length; i++) {
let brow = faddelem('tr',tbody);
let rec = results[i];
let iddetail = fgetidfromobs(rec);
let idinobsids = fgetidvsidsfromobs(rec);
let values = [
{innerText:i+1},
{innerHTML:furl('https://www.inaturalist.org/observations/'+rec.observation.id,rec.observation.id)},
{innerHTML:furl(`${urlobs}/${rec.observation.id}`,rec.observation.id)},
{innerHTML:'<img class="photo" src="'+(rec.observation.photos[0]?rec.observation.photos[0].url:'')+'" />'},
{innerText:rec.observation.quality_grade},
{innerHTML:'<img class="icon" src="'+rec.observation.user.icon+'" />'},
Expand Down Expand Up @@ -231,7 +232,7 @@
faddelems('td',brow,values);
if (!associatedobs.includes(rec.observation.id)) { associatedobs.push(rec.observation.id); };
};
document.getElementById("associatedobslink").innerHTML = `[related observations: ${furl(('https://www.inaturalist.org/observations?verifiable=any&place=any&id='+associatedobs.join(',')),'Explore')} | ${furl(('https://www.inaturalist.org/observations/identify?quality_grade=needs_id,research,casual&verifiable=any&place=any&id='+associatedobs.join(',')),'Identify')}]`;
document.getElementById("associatedobslink").innerHTML = `[related observations: ${furl((urlobs+'?verifiable=any&place=any&id='+associatedobs.join(',')),'Explore')} | ${furl((urlobs+'/identify?per_page='+per_page+'&quality_grade=needs_id,research,casual&verifiable=any&place=any&id='+associatedobs.join(',')),'Identify')}]`;

// buttons to go to prev or next page
let nav = faddelem('div',document.body,{id:'nav'});
Expand Down

0 comments on commit c7e549e

Please sign in to comment.