diff options
| author | Factiven <[email protected]> | 2023-10-22 19:43:17 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-10-22 19:43:17 +0700 |
| commit | f801f8f422954b884a6541321dba0669ee9d6173 (patch) | |
| tree | e0d5e106b99e9b4e0a4c4bf7bb0464617db85b8d /utils/imageUtils.js | |
| parent | Bump @babel/traverse from 7.22.8 to 7.23.2 (#90) (diff) | |
| download | moopa-4.2.0.tar.xz moopa-4.2.0.zip | |
Update v4.2.0 (#93)v4.2.0
Diffstat (limited to 'utils/imageUtils.js')
| -rw-r--r-- | utils/imageUtils.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/utils/imageUtils.js b/utils/imageUtils.js new file mode 100644 index 0000000..e5ac6a9 --- /dev/null +++ b/utils/imageUtils.js @@ -0,0 +1,22 @@ +export function getHeaders(providerId) { + switch (providerId) { + case "mangahere": + return { Referer: "https://mangahere.org" }; + case "mangadex": + return { Referer: "https://mangadex.org" }; + case "mangakakalot": + return { Referer: "https://mangakakalot.com" }; + case "mangapill": + return { Referer: "https://mangapill.com" }; + case "mangasee123": + return { Referer: "https://mangasee123.com" }; + case "comick": + return { Referer: "https://comick.app" }; + default: + return null; + } +} + +export function getRandomId() { + return Math.random().toString(36).substr(2, 9); +} |