This commit is contained in:
biglyderv 2024-09-13 19:02:19 -04:00
parent 212fce1dcf
commit fc0dbc4555
No known key found for this signature in database
GPG key ID: 33AC87E9ACE66954
2 changed files with 27 additions and 8 deletions

View file

@ -28,11 +28,18 @@ async function genTree(treeId) {
}
async function main() {
fetchData = await fetch(`https://scratch.mit.edu/projects/${treeID}/remixtree/bare/`).then(x => x.json());
// fetchData = await fetch(`https://scratch.mit.edu/projects/${treeID}/remixtree/bare/`).then(x => x.json());
fetchData = await fetch(`https://hf.zenoverse.net/tree/`).then(x => x.json());
let latestData = await fetch(`https://hf.zenoverse.net/api/`).then(x => x.json());
let lid = latestData[0].id;
let i = 0;
while (!fetchData[lid]) {
i++;
lid = latestData[i].id;
}
while (fetchData[lid].children.length > 0) {
let ch = fetchData[lid].children;
let ch2 = ch.filter(x => fetchData[x].children.length > 0);
@ -50,6 +57,8 @@ async function main() {
let start = params.get('start') * 1;
let end = params.get('end') * 1;
end = Math.min(end,entries.length-2);
if (start && end) {
entries = entries.splice(entries.length - end - 2, end - start + 1);
}

View file

@ -435,7 +435,17 @@ let eras = [
{
'name': 'Welded Eon',
'start': 7647,
'end': 8218
'end': 8276
},
{
'name': 'Unstroyed Eon',
'start': 8277,
'end': 8467
},
{
'name': 'Post-Dzje Eon',
'start': 8468,
'end': 9000
},
];