From ea3fa779a5bb28b9aa5860462e98e876e2e2846a Mon Sep 17 00:00:00 2001 From: Daniel Bulant Date: Wed, 10 Aug 2022 21:35:09 +0200 Subject: [PATCH] switch to non-worker proxy --- src/components/artList.svelte | 2 +- src/components/mangadexItems.svelte | 2 +- src/pages/[manga]/[chapter]/[page].svelte | 2 +- src/pages/[manga]/index.svelte | 2 +- src/util/baseGenerator.js | 2 +- src/util/request.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/artList.svelte b/src/components/artList.svelte index b48a7a2..3b6858d 100644 --- a/src/components/artList.svelte +++ b/src/components/artList.svelte @@ -14,7 +14,7 @@ Loading art {:then list} {#each list.data.sort((a, b) => a.attributes.volume - b.attributes.volume) as item} - selectedImage = `https://cors-anywhere.danbulant.workers.dev/?https://uploads.mangadex.org/covers/${mangaId}/${item.attributes.fileName}.512.jpg`} width=512 height=805 src="https://cors-anywhere.danbulant.workers.dev/?https://uploads.mangadex.org/covers/{mangaId}/{item.attributes.fileName}.512.jpg" alt="" draggable={false}> + selectedImage = `https://cors-anywhere.danbulant.cloud/https://uploads.mangadex.org/covers/${mangaId}/${item.attributes.fileName}.512.jpg`} width=512 height=805 src="https://cors-anywhere.danbulant.cloud/https://uploads.mangadex.org/covers/{mangaId}/{item.attributes.fileName}.512.jpg" alt="" draggable={false}> {/each} {/await} diff --git a/src/components/mangadexItems.svelte b/src/components/mangadexItems.svelte index 9b60811..290e283 100644 --- a/src/components/mangadexItems.svelte +++ b/src/components/mangadexItems.svelte @@ -14,7 +14,7 @@ open(entry)}>
{#if entry.relationships.find(t => t.type === "cover_art")} - + {:else} Broken art {/if} diff --git a/src/pages/[manga]/[chapter]/[page].svelte b/src/pages/[manga]/[chapter]/[page].svelte index eff8aff..304ee26 100644 --- a/src/pages/[manga]/[chapter]/[page].svelte +++ b/src/pages/[manga]/[chapter]/[page].svelte @@ -189,7 +189,7 @@ Back to chapter list
-Page {page} in chapter {chapter.attributes.chapter} of {manga.title.en} +Page {page} in chapter {chapter.attributes.chapter} of {manga.title.en}
{#if page > 1} diff --git a/src/pages/[manga]/index.svelte b/src/pages/[manga]/index.svelte index fa1b0e6..27b899f 100644 --- a/src/pages/[manga]/index.svelte +++ b/src/pages/[manga]/index.svelte @@ -306,7 +306,7 @@
{#if relationships.find(t => t.type === "cover_art")} - selectedImage = `https://cors-anywhere.danbulant.workers.dev/?https://uploads.mangadex.org/covers/${mangaId}/${relationships.find(t => t.type === "cover_art").attributes.fileName}.512.jpg`}> + selectedImage = `https://cors-anywhere.danbulant.cloud/https://uploads.mangadex.org/covers/${mangaId}/${relationships.find(t => t.type === "cover_art").attributes.fileName}.512.jpg`}> {/if}
{#if relationships.find(t => t.type === "author")} diff --git a/src/util/baseGenerator.js b/src/util/baseGenerator.js index 77fa02c..84c4ac0 100644 --- a/src/util/baseGenerator.js +++ b/src/util/baseGenerator.js @@ -62,7 +62,7 @@ export class BaseGenerator { async fetchImage(url, chapter) { var res; try { - res = await fetch("https://cors-anywhere.danbulant.workers.dev/?" + url); + res = await fetch("https://cors-anywhere.danbulant.cloud/" + url); } catch(e) { console.error(e); res = await fetch(proxy + url); diff --git a/src/util/request.js b/src/util/request.js index 14612b0..d146d12 100644 --- a/src/util/request.js +++ b/src/util/request.js @@ -1,4 +1,4 @@ -export const proxy = "https://cors-anywhere.danbulant.workers.dev/?"; +export const proxy = "https://cors-anywhere.danbulant.cloud/"; export const base = proxy + "https://api.mangadex.org/"; function request(endpoint, query, type = "GET", body) {