mirror of
https://github.com/danbulant/Mangades
synced 2026-07-05 19:10:58 +00:00
fix: search not working with links
This commit is contained in:
parent
d2cbfb4626
commit
eb87c4c86d
1 changed files with 3 additions and 2 deletions
|
|
@ -86,8 +86,9 @@
|
||||||
|
|
||||||
function open() {
|
function open() {
|
||||||
var id = name;
|
var id = name;
|
||||||
if(name.startsWith("https://mangadex.org/title")) {
|
if(name.startsWith("https://mangadex.org/title/")) {
|
||||||
id = name.substr("https://mangadex.org/title".length);
|
id = name.substr("https://mangadex.org/title/".length);
|
||||||
|
id = id.split("/")[0];
|
||||||
} 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)) {
|
} 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");
|
return alert("You provided invalid ID or link. Make sure you copy the full URL from mangadex.org title page");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue