manga-download / haruneko

Prototype of HakuNeko based on NW.js + TypeScript
https://haruneko-docs.pages.dev
149 stars 31 forks source link

Make ValidateMangaUrl async #886

Closed MikeZeDev closed 2 days ago

MikeZeDev commented 3 days ago

Suppose website change domain often we have 2 possibilities for clipboard to work:

1) Its following a pattern : we can use an adapted regexp i.e
/https?:\/\/w+\d*.mangafreak.me\/Manga\/[^/]+$/.test(url);

2) its NOT following a pattern ie "josephbent.com, galaxymanga.net" .

This PR allows performing async actions in ValidateMangaUrl, making dynamic domain update possible for clipboard use.

Please see MangaGalaxy.ts for the how to. The rest is just updating mangaplugins and connectors