aboutsummaryrefslogtreecommitdiff
path: root/utils/imageUtils.js
diff options
context:
space:
mode:
Diffstat (limited to 'utils/imageUtils.js')
-rw-r--r--utils/imageUtils.js22
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);
+}