mirror of
https://github.com/kalmarek/SmallHyperbolic
synced 2024-09-01 13:25:35 +02:00
16 lines
444 B
JavaScript
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)
|
||
|
;
|