mirror of https://github.com/kurisufriend/mlFE
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
548 B
23 lines
548 B
function parseinfo(info)
|
|
{
|
|
document.getElementById("title").innerHTML = info["name"];
|
|
console.log(info);
|
|
}
|
|
function loadmangos(info)
|
|
{
|
|
let listing = document.getElementById("listing");
|
|
info.forEach(manga => function(manga)
|
|
{
|
|
console.log(manga["id"]);
|
|
});
|
|
console.log(info);
|
|
}
|
|
function load(url = "https://test.cynic.moe")
|
|
{
|
|
fetch(url+"/info")
|
|
.then(response => response.json())
|
|
.then(data => parseinfo(data));
|
|
fetch(url+"/manga/search?sort")
|
|
.then(response => response.json())
|
|
.then(data => loadmangos(data));
|
|
} |