From 05a77daf5e06fb46ff26482112abe857e4316d9e Mon Sep 17 00:00:00 2001 From: cynic Date: Thu, 29 Apr 2021 11:19:46 -0400 Subject: [PATCH] init --- index.html | 14 ++++++++++++++ main.js | 23 +++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 index.html create mode 100644 main.js 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