updates
This commit is contained in:
parent
212fce1dcf
commit
fc0dbc4555
2 changed files with 27 additions and 8 deletions
11
js/app.js
11
js/app.js
|
@ -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);
|
||||
}
|
||||
|
|
12
js/data.js
12
js/data.js
|
@ -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
|
||||
},
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue