diff --git a/index.html b/index.html new file mode 100644 index 0000000..8d2658c --- /dev/null +++ b/index.html @@ -0,0 +1,14 @@ + + + + + + + +

loading...

+ +
+ + \ No newline at end of file diff --git a/main.js b/main.js new file mode 100644 index 0000000..9d113e1 --- /dev/null +++ b/main.js @@ -0,0 +1,23 @@ +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)); +} \ No newline at end of file