mirror of
https://github.com/danbulant/Mangades
synced 2026-06-17 13:21:03 +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() {
|
||||
var id = name;
|
||||
if(name.startsWith("https://mangadex.org/title")) {
|
||||
id = name.substr("https://mangadex.org/title".length);
|
||||
if(name.startsWith("https://mangadex.org/title/")) {
|
||||
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)) {
|
||||
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