mirror of
https://github.com/danbulant/Mangades
synced 2026-06-16 12:51:10 +00:00
I hate comeso
This commit is contained in:
parent
3df10a19ac
commit
ddaa2979cd
5 changed files with 127 additions and 102 deletions
|
|
@ -1,2 +1,4 @@
|
|||
# https://www.robotstxt.org/robotstxt.html
|
||||
User-agent: *
|
||||
Allow: /
|
||||
Disallow: /*
|
||||
|
|
@ -7,9 +7,25 @@
|
|||
export var selected;
|
||||
export var disabledDownload = false;
|
||||
export var progress = 0;
|
||||
|
||||
/**
|
||||
* @param {MouseEvent} e
|
||||
*/
|
||||
function click(e) {
|
||||
dispatch("select", e);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {MouseEvent} e
|
||||
*/
|
||||
function mouseenter(e) {
|
||||
if(e.buttons & 1) {
|
||||
dispatch("select");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<tr on:click={() => dispatch("select")} class:selected={selected} style="background-image: linear-gradient(to right, rgba(0, 255, 0, 0.247) {progress * 100}%, transparent {progress * 100}%)">
|
||||
<tr on:mouseenter={mouseenter} on:mousedown={click} class:selected={selected} style="background-image: linear-gradient(to right, rgba(0, 255, 0, 0.247) {progress * 100}%, transparent {progress * 100}%)">
|
||||
<td class="no-wrap">{chapter.data.attributes.volume ? "Vol " + chapter.data.attributes.volume : ""}</td>
|
||||
<td class="no-wrap">{chapter.data.attributes.chapter ? "Chapter " + chapter.data.attributes.chapter : ""}</td>
|
||||
<td>{chapter.data.attributes.title}</td>
|
||||
|
|
@ -22,6 +38,7 @@
|
|||
position: relative;
|
||||
transition: background-image 0.3s;
|
||||
background-repeat: no-repeat;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
tr.selected {
|
||||
|
|
@ -44,6 +61,8 @@
|
|||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
td.action:hover {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
import { CBZGenerator } from "../../util/generateCbz";
|
||||
import request from "../../util/request";
|
||||
import { BaseGenerator } from "../../util/baseGenerator";
|
||||
import { arraysEqual } from "../../util/arrays";
|
||||
|
||||
export var scoped;
|
||||
|
||||
|
|
@ -168,7 +169,23 @@
|
|||
}
|
||||
}
|
||||
|
||||
$: console.log(format);
|
||||
var copyrightOpen = false;
|
||||
|
||||
function selectAll() {
|
||||
chapters.then(res => {
|
||||
var chapters = res.results;
|
||||
if(arraysEqual(selected, chapters)) {
|
||||
selected = [];
|
||||
} else {
|
||||
selected = chapters.slice();
|
||||
}
|
||||
if(selected.length) {
|
||||
text = `Selected ${selected.length} chapters`;
|
||||
} else {
|
||||
text = defaultText;
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<svelte:window on:beforeUnload={beforeUnload} />
|
||||
|
|
@ -181,10 +198,22 @@
|
|||
<main>
|
||||
<h1>{manga.title.en}</h1>
|
||||
|
||||
<div class="linklist">
|
||||
<a href={$url("..")}>Go back to search page</a>
|
||||
<div class="flex">
|
||||
<div class="linklist">
|
||||
<a href={$url("..")}>Go back to search page</a>
|
||||
</div>
|
||||
<div class="copyright-header" class:copyright-header-active={copyrightOpen} on:click={() => copyrightOpen = !copyrightOpen}>Copyright infringement? (click)</div>
|
||||
</div>
|
||||
|
||||
{#if copyrightOpen}
|
||||
<p class="copyright">
|
||||
Open <a href="https://mangadex.org/title/{mangaId}">Mangadex.org page of this manga</a>, select MORE and click REPORT. I cannot delete the content, even if you report it to this website's hosting, as this is just one of many clients to mangadex.
|
||||
<br>
|
||||
<br>
|
||||
In case of reports, I can just block the content from being loaded in this page, but that doesn't mean it's deleted nor that any other client can't access it. And this website is smaller than mangadex, so it doesn't make sense to bother yourself with reporting it to this site when you can report it to one and have it removed from more sites, including this one.
|
||||
</p>
|
||||
{/if}
|
||||
|
||||
<br>
|
||||
|
||||
<div class="state {state}">
|
||||
|
|
@ -207,11 +236,16 @@
|
|||
<button disabled={!selected.length} on:click={downloadMulti}>Download</button>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<b>
|
||||
Do not close the tab when a download is in progress.
|
||||
</b>
|
||||
</p>
|
||||
<div class="flex">
|
||||
<p>
|
||||
<b>
|
||||
Do not close the tab when a download is in progress.
|
||||
</b>
|
||||
</p>
|
||||
<button on:click={selectAll}>
|
||||
Select all
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{#await chapters}
|
||||
Loading chapters...
|
||||
|
|
@ -229,9 +263,32 @@
|
|||
{/await}
|
||||
|
||||
<p>DISCLAIMER: This site isn't distributing any content and is using mangadex.org API. Website is open source, and I don't claim any copyright on the publications.</p>
|
||||
<br>
|
||||
</main>
|
||||
|
||||
<style>
|
||||
.flex {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.copyright {
|
||||
margin-block-start: 0;
|
||||
margin-block-end: 0;
|
||||
padding: 10px;
|
||||
background: rgb(214, 214, 214);
|
||||
border-radius: 5px 0 5px 5px;
|
||||
}
|
||||
.copyright-header {
|
||||
background: rgb(214, 214, 214);
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
user-select: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
.copyright-header-active {
|
||||
border-radius: 5px 5px 0 0;
|
||||
}
|
||||
.download {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
|
|
|
|||
|
|
@ -5,12 +5,13 @@
|
|||
import { goto, url } from '@roxi/routify/runtime/helpers';
|
||||
import MultiSelect from '../components/multiSelect.svelte';
|
||||
|
||||
var name = $params.search;
|
||||
$: {
|
||||
const url = new URL(window.location.toString());
|
||||
url.searchParams.set("search", name || "");
|
||||
history.replaceState(history.state, "", url.toString());
|
||||
}
|
||||
var name = "";
|
||||
// var name = $params.search;
|
||||
// $: {
|
||||
// const url = new URL(window.location.toString());
|
||||
// url.searchParams.set("search", name || "");
|
||||
// history.replaceState(history.state, "", url.toString());
|
||||
// }
|
||||
/**
|
||||
* Searches for results
|
||||
* @param {string} title
|
||||
|
|
@ -83,25 +84,14 @@
|
|||
sortValue: "desc"
|
||||
};
|
||||
|
||||
const options = {
|
||||
contentRating: {
|
||||
safe: "Safe",
|
||||
suggestive: "Suggestive",
|
||||
erotica: "Erotica",
|
||||
pornographic: "Pornographic"
|
||||
},
|
||||
demographic: {
|
||||
shounen: "Shounen",
|
||||
shoujo: "Shoujo",
|
||||
josei: "Josei",
|
||||
none: "None"
|
||||
},
|
||||
status: {
|
||||
ongoing: "Ongoing",
|
||||
completed: "Completed",
|
||||
hiatus: "Hiatus - Paused",
|
||||
cancelled: "Cancelled"
|
||||
function open() {
|
||||
var id = name;
|
||||
if(name.startsWith("https://mangadex.org/title")) {
|
||||
id = name.substr("https://mangadex.org/title".length);
|
||||
} else if(!/^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(name)) {
|
||||
return alert("You provided invalid ID or link. Make sure you copy the full URL from mangadex.org title page");
|
||||
}
|
||||
$goto("./" + id);
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
@ -114,79 +104,21 @@
|
|||
|
||||
<main>
|
||||
|
||||
<h1>MANGADEX</h1>
|
||||
<input type="text" bind:value={name}>
|
||||
|
||||
<div class="filters">
|
||||
<div class="grow">
|
||||
<label for="content-rating">Content rating</label>
|
||||
<MultiSelect id="content-rating" bind:value={filters.contentRating} options={options.contentRating} />
|
||||
</div>
|
||||
<div class="grow">
|
||||
<label for="demographic">Demographic</label>
|
||||
<MultiSelect id="demographic" bind:value={filters.demographic} options={options.demographic} />
|
||||
</div>
|
||||
<div class="grow">
|
||||
<label for="status">Manga Status</label>
|
||||
<MultiSelect id="status" bind:value={filters.status} options={options.status} />
|
||||
</div>
|
||||
<p style="margin: 0;"><i>Sorts currently don't work (mangadex shows the same results).</i></p>
|
||||
<div class="flex">
|
||||
<label for="sort">Sort by:</label>
|
||||
<select name="sort" id="sort" class="flex-grow" bind:value={filters.sort}>
|
||||
<option value="createdAt">Creation date</option>
|
||||
<option value="updatedAt">Update date</option>
|
||||
</select>
|
||||
<select name="sort-type" id="sort-type" class="flex-grow" bind:value={filters.sortValue}>
|
||||
<option value="asc">Ascending</option>
|
||||
<option value="desc">Descending</option>
|
||||
</select>
|
||||
</div>
|
||||
<h1>miniMANGADEX</h1>
|
||||
<div class="flex">
|
||||
<input type="text" placeholder="Enter UUID or URL of mangadex.org manga" bind:value={name}>
|
||||
<button on:click={open}>Go</button>
|
||||
</div>
|
||||
|
||||
{#await result}
|
||||
Loading...
|
||||
{:then result}
|
||||
<div class="flex">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
Showing results:
|
||||
</td>
|
||||
<td class="value">
|
||||
{result.results.length}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Total results:
|
||||
</td>
|
||||
<td class="value">
|
||||
{result.total}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div>
|
||||
<button on:click={() => randomManga()} disabled={randomMangaLoading}>Random</button>
|
||||
</div>
|
||||
</div>
|
||||
<ul>
|
||||
{#each result.results as manga}
|
||||
<li>
|
||||
<a href={$url("./" + manga.data.id)}>
|
||||
{manga.data.attributes.title.en}
|
||||
</a>
|
||||
</li>
|
||||
{/each}
|
||||
</ul>
|
||||
<div class="flex">
|
||||
<button on:click={randomManga} disabled={randomMangaLoading}>Random</button>
|
||||
<a href="https://mangadex.org">Mangadex.org</a>
|
||||
</div>
|
||||
|
||||
{#if result.results.length < result.total}
|
||||
<p>Loading next manga...</p>
|
||||
{/if}
|
||||
<p>You got the end of the list.</p>
|
||||
{/await}
|
||||
<p>Wondering why this downgrade? My main site was taken down 3 times for copyright infringement because of this site, even though I wasn't hosting anything. The webhosting people weren't understanding at all and just kept taking down my site. Comeso (the company that was sending copyright infringement emails) didn't reply to my attempts to contact them using the email they provided or the website they sent. They also sent few invalid copyright infringement emails, yet my webhosting still took my site down for them. I wasn't using them for this page anyway, so they took down basically everything else except this site (good job boys).</p>
|
||||
<p>I disabled search engine indexing, so google shouldn't show results of manga directly but just link to this page. Search functionality got removed and instead you need to send the URL itself, which should prevent automatic scanners. I'm sorry, please tell Comeso and Webglobe (the webhoster) to not report websites that don't break copyright infringement. Thank you.</p>
|
||||
|
||||
<p>DISCLAIMER: This site isn't distributing any content and is using mangadex.org API. Website is open source, and I don't claim any copyright on the publications.</p>
|
||||
<p>DISCLAIMER: This site isn't distributing any content and is using mangadex.org API. All of the site's requests are done client side, my servers aren't sharing any manga data. Website is open source, and I don't claim any copyright on the publications.</p>
|
||||
</main>
|
||||
|
||||
<style>
|
||||
|
|
|
|||
15
src/util/arrays.js
Normal file
15
src/util/arrays.js
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
export function arraysEqual(a, b) {
|
||||
if (a === b) return true;
|
||||
if (a == null || b == null) return false;
|
||||
if (a.length !== b.length) return false;
|
||||
|
||||
// If you don't care about the order of the elements inside
|
||||
// the array, you should sort both arrays here.
|
||||
// Please note that calling sort on an array will modify that array.
|
||||
// you might want to clone your array first.
|
||||
|
||||
for (var i = 0; i < a.length; ++i) {
|
||||
if (a[i] !== b[i]) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
Loading…
Reference in a new issue