diff --git a/about.html b/about.html index 2f39832..120be80 100644 --- a/about.html +++ b/about.html @@ -17,9 +17,29 @@
+
+

Instance address:

+ + + +

Current:

+
+ + + diff --git a/catalog.html b/catalog.html index 0e0d862..8d737ac 100644 --- a/catalog.html +++ b/catalog.html @@ -41,8 +41,15 @@ + diff --git a/css/stylesheet.css b/css/stylesheet.css index 5d23aaa..9d3440a 100644 --- a/css/stylesheet.css +++ b/css/stylesheet.css @@ -15,6 +15,8 @@ button { border: none; padding-left: 1em; padding-right: 1em; + padding-top: 0.5em; + padding-bottom: 0.5em; border-radius: 1em; vertical-align: center; outline: none; diff --git a/js/cookie.js b/js/cookie.js new file mode 100644 index 0000000..a30f60d --- /dev/null +++ b/js/cookie.js @@ -0,0 +1,17 @@ +function get_instance() { + var addr = "test.cynic.moe"; + var cookie = document.cookie; + if(cookie != "") { + addr = decodeURIComponent(cookie).split(";")[0].split("=")[1]; + } + return addr; +} + +function set_instance(addr) { + var str = "Instance="+addr+"; SameSite=Lax;"; + document.cookie = str; +} + +function clear_instance() { + document.cookie = "Instance=test.cynic.moe; SameSite=Lax;"; +} diff --git a/js/reader.js b/js/reader.js index 63eb58f..822d05c 100644 --- a/js/reader.js +++ b/js/reader.js @@ -181,7 +181,7 @@ document.querySelector("#titlebar_container").addEventListener("mouseleave", fun // parse metadata // --------------------------------------------------------- -function load_pages() { +function load_pages(remote) { if(url.searchParams.has("cid")){ cid = url.searchParams.get("cid"); if(cid == ""){ @@ -204,7 +204,7 @@ function load_pages() { for (var i = 1; i <= pageNo; i++) { pageView.appendChild(Object.assign( document.createElement("img"), - {draggable: "false", src: `https://amangathing.ddns.net/ipfs/${cid}/${i}.webp`, id: `image${i}`, visibility: "hidden"} + {draggable: "false", src: `https://ipfs.cynic.moe/ipfs/${cid}/${i}.webp`, id: `image${i}`, visibility: "hidden"} )); } diff --git a/js/title_list.js b/js/title_list.js index 65ead02..2d6f504 100644 --- a/js/title_list.js +++ b/js/title_list.js @@ -3,9 +3,8 @@ // ---------------------------------------------------------------- function load_titles(remote) { - if(remote == ""){ - return; - } + base = remote; + remote = remote+"/manga/search?title="; fetch(remote) .then(res => res.json()) .then(function (res) { @@ -27,7 +26,7 @@ function load_titles(remote) { )) .appendChild(Object.assign( document.createElement("img"), - {className: "thumbnail", src: "/instance/thumbnail/"+manga["id"]+".webp"} + {className: "thumbnail", src: base+"/thumbnail/"+manga["id"]+".webp"} )); //title first_row.appendChild(Object.assign( diff --git a/reader.html b/reader.html index 5882d00..46f7625 100644 --- a/reader.html +++ b/reader.html @@ -44,10 +44,11 @@ diff --git a/search.html b/search.html index 74fba1b..3edf950 100644 --- a/search.html +++ b/search.html @@ -75,10 +75,11 @@ diff --git a/title.html b/title.html index b72d70b..5838c5d 100644 --- a/title.html +++ b/title.html @@ -48,8 +48,15 @@ +