1
0
mirror of https://github.com/kalmarek/SmallHyperbolic synced 2024-07-27 21:10:31 +02:00
SmallHyperbolic/docs/main.js

16 lines
444 B
JavaScript

const groups_url = new URL("https://raw.githubusercontent.com/kalmarek/SmallHyperbolic/mk/json/data/triangle_groups.json")
async function fetch_json(url) {
try {
let response = await fetch(url);
let json = await response.json();
return json;
} catch (err) {
console.log("Error while fetching json:" + err);
}
}
let table = fetch_json(groups_url)
.then(setup_table)
.then(setup_filter)
;