diff --git a/index.html b/index.html
index f64dd1be..22786bfc 100644
--- a/index.html
+++ b/index.html
@@ -1,4 +1,4 @@
-
+
<%= productName %>
diff --git a/quasar.config.js b/quasar.config.js
index b2438d45..ecd5f29b 100644
--- a/quasar.config.js
+++ b/quasar.config.js
@@ -6,17 +6,17 @@
// Configuration for your app
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js
-const { extend } = require("quasar")
-const { configure } = require("quasar/wrappers")
const esbuild = require("esbuild")
const { obfuscate } = require("javascript-obfuscator")
+const { extend } = require("quasar")
+const { configure } = require("quasar/wrappers")
function removeDataTestAttrs(node) {
if (node.type === 1 /* NodeTypes.ELEMENT */) {
node.props = node.props.filter((prop) =>
prop.type === 6 /* NodeTypes.ATTRIBUTE */
? prop.name !== "data-test"
- : true
+ : true,
)
}
}
@@ -46,7 +46,7 @@ function vitePluginBuildRaw() {
].map(([name, value]) => [
`process.env.${name.replace(/[^\w\d_$]/g, "_")}`,
JSON.stringify(value),
- ])
+ ]),
),
})
const { text } = code.outputFiles[0]
@@ -71,9 +71,9 @@ function vitePluginBuildRaw() {
id.includes("&minify") ||
process.env.NODE_ENV !== "production",
treeShaking: true,
- }
+ },
).code
- : text
+ : text,
)}`,
map: null,
@@ -157,7 +157,7 @@ module.exports = configure((/* ctx */) => {
// removes the protocol and replaces it with the port we're connecting to
host: process.env.GITPOD_WORKSPACE_URL.replace(
"https://",
- "9000-"
+ "9000-",
),
protocol: "wss",
clientPort: 443,
diff --git a/src/apis/__helpers__/parseItem.ts b/src/apis/__helpers__/parseItem.ts
index b64e8611..1d4b94d5 100644
--- a/src/apis/__helpers__/parseItem.ts
+++ b/src/apis/__helpers__/parseItem.ts
@@ -35,7 +35,7 @@ export function parseItem($: CheerioAPI, $li: Cheerio, now: number) {
.trim()
.replace("Lượt xem:", "")
.trim()
- .replace(/,/g, "")
+ .replace(/,/g, ""),
)
const follows =
$info.length === 0
@@ -46,7 +46,7 @@ export function parseItem($: CheerioAPI, $li: Cheerio, now: number) {
.text()
.trim()
.replace("Lượt theo dõi:", "")
- .replace(/,/g, "")
+ .replace(/,/g, ""),
)
const tags = $li
.find(".list-tags")
diff --git a/src/apis/__helpers__/parseTimeAgo.ts b/src/apis/__helpers__/parseTimeAgo.ts
index 70531d00..45d277e3 100644
--- a/src/apis/__helpers__/parseTimeAgo.ts
+++ b/src/apis/__helpers__/parseTimeAgo.ts
@@ -29,11 +29,11 @@ export function parseTimeAgo(ago: string, now: number): number {
"/" +
($5?.slice(1) ?? new Date(now).getFullYear())
)
- }
- )
+ },
+ ),
).getTime() ||
new Date(
- ago.replace(/^(\d{1,2})\/(\d{1,2})\/(\d{1,2})$/, "$2/$1/$3")
+ ago.replace(/^(\d{1,2})\/(\d{1,2})\/(\d{1,2})$/, "$2/$1/$3"),
).getTime()
)
}
diff --git a/src/apis/nettruyen/parsers/[general].ts b/src/apis/nettruyen/parsers/[general].ts
index 1ef85519..d7ce9a9a 100644
--- a/src/apis/nettruyen/parsers/[general].ts
+++ b/src/apis/nettruyen/parsers/[general].ts
@@ -38,7 +38,7 @@ export default function general(html: string, now: number) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const path = parsePath($item.attr("href")!).replace(
/\/tim-truyen(\/[^?]|$)/,
- "/the-loai$1"
+ "/the-loai$1",
)
const name = $item.text()
@@ -55,7 +55,7 @@ export default function general(html: string, now: number) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const value = new URL(path, "http://localhost").searchParams.get(
- "status"
+ "status",
)!
return { name, value }
@@ -71,7 +71,7 @@ export default function general(html: string, now: number) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const value = new URL(path, "http://localhost").searchParams.get(
- "sort"
+ "sort",
)!
return { name, value }
@@ -80,13 +80,13 @@ export default function general(html: string, now: number) {
const filters = [genres, status, sort]
const items = $(
- "#ctl00_divCenter > div.Module.Module-170 .item, .items .item"
+ "#ctl00_divCenter > div.Module.Module-170 .item, .items .item",
)
.toArray()
.map((item) => parseItem($, $(item), now))
const $curPage = parseInt(
- $("#ctl00_mainContent_ctl01_divPager .active").text().trim()
+ $("#ctl00_mainContent_ctl01_divPager .active").text().trim(),
)
const curPage = Number.isNaN($curPage) ? 1 : $curPage
const maxPage = $curPage
@@ -94,8 +94,8 @@ export default function general(html: string, now: number) {
new URL(
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
$("#ctl00_mainContent_ctl01_divPager a").last().attr("href")!,
- "http://localhost"
- ).searchParams.get("page") ?? "1"
+ "http://localhost",
+ ).searchParams.get("page") ?? "1",
)
: 1
diff --git a/src/apis/nettruyen/parsers/__helpers__/parseComment.ts b/src/apis/nettruyen/parsers/__helpers__/parseComment.ts
index 4c45b738..8daa7c36 100644
--- a/src/apis/nettruyen/parsers/__helpers__/parseComment.ts
+++ b/src/apis/nettruyen/parsers/__helpers__/parseComment.ts
@@ -26,11 +26,11 @@ export interface RComment {
export function parseComment(
$: CheerioAPI,
$item: Cheerio,
- now: number
+ now: number,
): RComment {
const id = parseInt(
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- $item.attr("id")!.match(/\d+/)![0]
+ $item.attr("id")!.match(/\d+/)![0],
)
const author = {
@@ -45,7 +45,7 @@ export function parseComment(
$item
.find(".member > .progress-bar")
.attr("style")!
- .match(/width:\s*(\d+)/)![1]
+ .match(/width:\s*(\d+)/)![1],
),
},
chapter: normalizeChName($item.find(".cmchapter").text().trim()),
diff --git a/src/apis/nettruyen/parsers/__helpers__/parseItem.ts b/src/apis/nettruyen/parsers/__helpers__/parseItem.ts
index d9bed1c3..a94ced07 100644
--- a/src/apis/nettruyen/parsers/__helpers__/parseItem.ts
+++ b/src/apis/nettruyen/parsers/__helpers__/parseItem.ts
@@ -9,7 +9,7 @@ import { getImage } from "./getImage"
function findWithFirstText(
$: CheerioAPI,
$list: Cheerio,
- text: string
+ text: string,
) {
return $(
$list.toArray().find((el) => {
@@ -19,7 +19,7 @@ function findWithFirstText(
if (c.startsWith(text)) return true
return false
- })
+ }),
)
.text()
.trim()
diff --git a/src/apis/nettruyen/parsers/truyen-tranh/[slug].ts b/src/apis/nettruyen/parsers/truyen-tranh/[slug].ts
index bc8c2b05..561ca5d5 100644
--- a/src/apis/nettruyen/parsers/truyen-tranh/[slug].ts
+++ b/src/apis/nettruyen/parsers/truyen-tranh/[slug].ts
@@ -18,11 +18,11 @@ export default function slug(html: string, now: number) {
// eslint-disable-next-line camelcase
const updated_at = parseTimeAgo(
$detail.find("time").text().trim().slice(16, -1),
- now
+ now,
)
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const image = getImage(
- $("#item-detail > div.detail-info > div > div.col-xs-4.col-image > img")
+ $("#item-detail > div.detail-info > div > div.col-xs-4.col-image > img"),
)!
const othername = $detail.find(".othername p:not(.name)").text().trim()
@@ -38,7 +38,7 @@ export default function slug(html: string, now: number) {
.toArray()
.map((item) => parseAnchor($(item)))
const views = parseInt(
- $detail.find(".kind").next().find("p:not(.name)").text().replace(/\./, "")
+ $detail.find(".kind").next().find("p:not(.name)").text().replace(/\./, ""),
)
const $rate = $detail.find("span[itemprop=aggregateRating]")
const rate =
@@ -75,7 +75,7 @@ export default function slug(html: string, now: number) {
$("#ctl00_mainContent_divPager > ul > li:nth-child(14) > a")
.last()
.attr("href")
- ?.slice(1) ?? "1"
+ ?.slice(1) ?? "1",
) || 1
return {
diff --git a/src/apis/nettruyen/parsers/truyen-tranh/[slug]/[ep-id].ts b/src/apis/nettruyen/parsers/truyen-tranh/[slug]/[ep-id].ts
index 94fb3766..a6953e32 100644
--- a/src/apis/nettruyen/parsers/truyen-tranh/[slug]/[ep-id].ts
+++ b/src/apis/nettruyen/parsers/truyen-tranh/[slug]/[ep-id].ts
@@ -13,7 +13,7 @@ export default function epId(html: string, now: number) {
const name = $("h1").text().split("-").slice(0, -1).join("-").trim()
const { path: manga } = parseAnchor(
- $("#ctl00_divCenter > div > div:nth-child(1) > div.top > h1 > a")
+ $("#ctl00_divCenter > div > div:nth-child(1) > div.top > h1 > a"),
)
const uid = parseInt(html.match(/gOpts\.comicId=(\d+)/)?.[1] ?? "")
const ep_id = parseInt(html.match(/gOpts\.chapterId=(\d+)/)?.[1] ?? "")
@@ -26,7 +26,7 @@ export default function epId(html: string, now: number) {
.text()
.trim()
.slice(16, -1),
- now
+ now,
)
const pages = $(".reading-detail img")
.toArray()
@@ -49,7 +49,7 @@ export default function epId(html: string, now: number) {
$("#ctl00_mainContent_divPager > ul > li:nth-child(14) > a")
.last()
.attr("href")
- ?.slice(1) ?? "1"
+ ?.slice(1) ?? "1",
) || 1
return {
@@ -95,15 +95,15 @@ export const SERVERS: {
return withProxyDeno(
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
decodeURIComponent(item.original!.split("&url", 2)[1]),
- headersNettruyen
+ headersNettruyen,
)
}
return withProxyDeno(
`https://images2-focus-opensocial.googleusercontent.com/gadgets/proxy?container=focus&gadget=a&no_expand=1&resize_h=0&rewriteMime=image%2F*&url=${encodeURIComponent(
- item.original
+ item.original,
)}`,
- headersNettruyen
+ headersNettruyen,
)
},
},
diff --git a/src/apis/nettruyen/runs/[general].ts b/src/apis/nettruyen/runs/[general].ts
index 074dd781..ebb55be0 100644
--- a/src/apis/nettruyen/runs/[general].ts
+++ b/src/apis/nettruyen/runs/[general].ts
@@ -8,7 +8,7 @@ import Worker from "../workers/[general]?worker"
export default async function (
path: string,
page: number,
- query: LocationQuery | Record
+ query: LocationQuery | Record,
) {
if (path.endsWith("/")) path = path.slice(0, -1)
diff --git a/src/apis/nettruyen/runs/auth/login.ts b/src/apis/nettruyen/runs/auth/login.ts
index cbac3f8b..93543a66 100644
--- a/src/apis/nettruyen/runs/auth/login.ts
+++ b/src/apis/nettruyen/runs/auth/login.ts
@@ -8,7 +8,7 @@ export default async function login(username: string, password: string) {
ctl00$mainContent$login1$LoginCtrl$Password: password,
ctl00$mainContent$login1$LoginCtrl$RememberMe: "on",
ctl00$mainContent$login1$LoginCtrl$Login: "Đăng nhập",
- }
+ },
)
// eslint-disable-next-line functional/no-throw-statement
diff --git a/src/apis/nettruyen/runs/auth/user.ts b/src/apis/nettruyen/runs/auth/user.ts
index 7ce67a98..ba165cd3 100644
--- a/src/apis/nettruyen/runs/auth/user.ts
+++ b/src/apis/nettruyen/runs/auth/user.ts
@@ -6,7 +6,7 @@ export default async function (token: string) {
{},
{
cookie: `.ASPXAUTH=${token}`,
- }
+ },
)
const $data = JSON.parse(data)
diff --git a/src/apis/nettruyen/runs/get-list-chapters.ts b/src/apis/nettruyen/runs/get-list-chapters.ts
index 6f0ec815..0efb096a 100644
--- a/src/apis/nettruyen/runs/get-list-chapters.ts
+++ b/src/apis/nettruyen/runs/get-list-chapters.ts
@@ -6,7 +6,7 @@ import { CURL } from "../const"
export default async function (manga_id: number) {
const { data } = await get(
// eslint-disable-next-line camelcase
- `${CURL}/Comic/Services/ComicService.asmx/ProcessChapterList?comicId=${manga_id}`
+ `${CURL}/Comic/Services/ComicService.asmx/ProcessChapterList?comicId=${manga_id}`,
)
return JSON.parse(data).chapters.map(
@@ -17,6 +17,6 @@ export default async function (manga_id: number) {
path: parsePath(item.url),
updated_at: null,
}
- }
+ },
)
}
diff --git a/src/apis/nettruyen/runs/index.ts b/src/apis/nettruyen/runs/index.ts
index 5724d53d..d8a0adac 100644
--- a/src/apis/nettruyen/runs/index.ts
+++ b/src/apis/nettruyen/runs/index.ts
@@ -9,10 +9,10 @@ import Worker from "../workers/index?worker"
export default async function index() {
const [index, topDay] = await Promise.all([
get(CURL).then((res) =>
- PostWorker(Worker, res.data, Date.now())
+ PostWorker(Worker, res.data, Date.now()),
),
get(`${CURL}/tim-truyen?status=-1&sort=13`).then((res) =>
- PostWorker(WorkerGeneral, res.data, Date.now())
+ PostWorker(WorkerGeneral, res.data, Date.now()),
),
])
diff --git a/src/apis/nettruyen/runs/lich-su.ts b/src/apis/nettruyen/runs/lich-su.ts
index d759b68e..64f13a50 100644
--- a/src/apis/nettruyen/runs/lich-su.ts
+++ b/src/apis/nettruyen/runs/lich-su.ts
@@ -6,12 +6,12 @@ import Worker from "../workers/[general]?worker"
export default async function (page: number, token: string) {
const { data } = await get(
- `${API_CURL}/Comic/Services/ComicService.asmx/GetReadComics?token=${token}&page=${page}`
+ `${API_CURL}/Comic/Services/ComicService.asmx/GetReadComics?token=${token}&page=${page}`,
)
return PostWorker(
Worker,
decodeURIComponent(JSON.parse(data).listHtml),
- Date.now()
+ Date.now(),
)
}
diff --git a/src/apis/nettruyen/runs/pre-search.ts b/src/apis/nettruyen/runs/pre-search.ts
index f629b4ee..db1ebe24 100644
--- a/src/apis/nettruyen/runs/pre-search.ts
+++ b/src/apis/nettruyen/runs/pre-search.ts
@@ -7,8 +7,8 @@ import Worker from "../workers/pre-search?worker"
export default async function presearch(keyword: string, page: number) {
const { data } = await get(
`${CURL}/Comic/Services/SuggestSearch.ashx?q=${encodeURIComponent(
- keyword
- )}&page=${page}`
+ keyword,
+ )}&page=${page}`,
)
return PostWorker(Worker, data)
diff --git a/src/apis/nettruyen/runs/theo-doi.ts b/src/apis/nettruyen/runs/theo-doi.ts
index 19c3c8e0..acd11620 100644
--- a/src/apis/nettruyen/runs/theo-doi.ts
+++ b/src/apis/nettruyen/runs/theo-doi.ts
@@ -9,15 +9,15 @@ export default async function (
page: number,
user_uid: string,
token: string,
- type: string
+ type: string,
) {
const { data } = await get(
- `${API_CURL}/Comic/Services/ComicService.asmx/GetFollowedPageComics?page=${page}&userGuid=${user_uid}&loadType=${type}&token=${token}`
+ `${API_CURL}/Comic/Services/ComicService.asmx/GetFollowedPageComics?page=${page}&userGuid=${user_uid}&loadType=${type}&token=${token}`,
)
return PostWorker(
Worker,
decodeURIComponent(JSON.parse(data).followedListHtml),
- Date.now()
+ Date.now(),
)
}
diff --git a/src/apis/nettruyen/runs/tim-kiem.ts b/src/apis/nettruyen/runs/tim-kiem.ts
index bff22e3d..2b5880ac 100644
--- a/src/apis/nettruyen/runs/tim-kiem.ts
+++ b/src/apis/nettruyen/runs/tim-kiem.ts
@@ -6,7 +6,7 @@ import Worker from "../workers/[general]?worker"
export default async function (query: string, page: number) {
const { data } = await get(
- `${CURL}/tim-truyen?keyword=${encodeURIComponent(query)}&page=${page}`
+ `${CURL}/tim-truyen?keyword=${encodeURIComponent(query)}&page=${page}`,
)
return PostWorker(Worker, data, Date.now())
diff --git a/src/apis/nettruyen/runs/truyen-tranh/[auth].ts b/src/apis/nettruyen/runs/truyen-tranh/[auth].ts
index 33bfefb9..a7d7c726 100644
--- a/src/apis/nettruyen/runs/truyen-tranh/[auth].ts
+++ b/src/apis/nettruyen/runs/truyen-tranh/[auth].ts
@@ -5,11 +5,11 @@ export default async function (
comicId: number,
// eslint-disable-next-line camelcase
user_uid: string,
- token: string
+ token: string,
) {
const { data } = await get(
// eslint-disable-next-line camelcase
- `${API_CURL}/Comic/Services/ComicService.asmx/GetFollowedButtonComic?comicId=${comicId}&userGuid=${user_uid}&token=${token}`
+ `${API_CURL}/Comic/Services/ComicService.asmx/GetFollowedButtonComic?comicId=${comicId}&userGuid=${user_uid}&token=${token}`,
)
const { isFollowed, readChapters, readHtml, markAsReadHtml } =
@@ -20,13 +20,13 @@ export default async function (
return {
isFollowed: isFollowed as boolean,
readsChapter: new Set(
- readChapters?.map((item: string) => parseInt(item)) as number[]
+ readChapters?.map((item: string) => parseInt(item)) as number[],
),
canMarkReadAll: !!markAsReadHtml,
readContinueId: pathEpCont
? parseInt(
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- parsePath(pathEpCont).split("/").slice(-2).filter(Boolean).at(-1)!
+ parsePath(pathEpCont).split("/").slice(-2).filter(Boolean).at(-1)!,
)
: undefined,
}
diff --git a/src/apis/nettruyen/runs/truyen-tranh/[slug]-chap-[chap].ts b/src/apis/nettruyen/runs/truyen-tranh/[slug]-chap-[chap].ts
index 2775d9aa..6443a9a3 100644
--- a/src/apis/nettruyen/runs/truyen-tranh/[slug]-chap-[chap].ts
+++ b/src/apis/nettruyen/runs/truyen-tranh/[slug]-chap-[chap].ts
@@ -7,7 +7,7 @@ import Worker from "../../workers/truyen-tranh/[slug]-chap-[chap]?worker"
export default async function (
slug: string,
- fast: Fast
+ fast: Fast,
): Promise<
Fast extends true
? Awaited>
@@ -28,7 +28,7 @@ export default async function (
const result = await PostWorker(Worker, data, Date.now())
if (!fast) {
const { data } = await get(
- `${CURL}/Comic/Services/ComicService.asmx/ProcessChapterList?comicId=${result.uid}`
+ `${CURL}/Comic/Services/ComicService.asmx/ProcessChapterList?comicId=${result.uid}`,
)
return {
...result,
@@ -40,7 +40,7 @@ export default async function (
path: parsePath(item.url),
updated_at: null,
}
- }
+ },
),
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} as any
diff --git a/src/apis/nettruyen/runs/truyen-tranh/comment/get.ts b/src/apis/nettruyen/runs/truyen-tranh/comment/get.ts
index 0b00720f..78e4d2e5 100644
--- a/src/apis/nettruyen/runs/truyen-tranh/comment/get.ts
+++ b/src/apis/nettruyen/runs/truyen-tranh/comment/get.ts
@@ -10,12 +10,12 @@ export default async function GetComment(
chapterId = -1,
parentId = 0,
page: number,
- comicKey: string
+ comicKey: string,
) {
const { data } = await get(
`https://www.nettruyenmax.com/Comic/Services/CommentService.asmx/List?comicId=${comicId}&orderBy=${
orderByNews ? 5 : 0
- }&chapterId=${chapterId}&parentId=${parentId}&pageNumber=${page}&token=${comicKey}`
+ }&chapterId=${chapterId}&parentId=${parentId}&pageNumber=${page}&token=${comicKey}`,
)
const { commentCount: comments_count, pager, response } = JSON.parse(data)
@@ -23,7 +23,7 @@ export default async function GetComment(
return {
comments_count: parseInt(comments_count),
comments_page_number: parseInt(
- pager.slice(pager.indexOf('a href="#') >>> 0, 2)
+ pager.slice(pager.indexOf('a href="#') >>> 0, 2),
),
comments: await PostWorker(Worker, response, Date.now()),
}
diff --git a/src/apis/nettruyen/runs/truyen-tranh/follow.ts b/src/apis/nettruyen/runs/truyen-tranh/follow.ts
index f1815590..8effda3d 100644
--- a/src/apis/nettruyen/runs/truyen-tranh/follow.ts
+++ b/src/apis/nettruyen/runs/truyen-tranh/follow.ts
@@ -9,7 +9,7 @@ export default async function Follow(comicId: number, key: string) {
}) + "",
{
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
- }
+ },
)
const { data: token2 } = JSON.parse(data)
@@ -21,7 +21,7 @@ export default async function Follow(comicId: number, key: string) {
}) + "",
{
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
- }
+ },
)
const { status, followedCount } = JSON.parse(data2)
diff --git a/src/apis/truyenqqq.vn/parsers/[general].ts b/src/apis/truyenqqq.vn/parsers/[general].ts
index 410387a9..831597dc 100644
--- a/src/apis/truyenqqq.vn/parsers/[general].ts
+++ b/src/apis/truyenqqq.vn/parsers/[general].ts
@@ -56,7 +56,7 @@ export default function general(html: string, now: number) {
...new URL(
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
$item.attr("href")!,
- "http://localhost"
+ "http://localhost",
).searchParams.entries(),
].at(-1)!
@@ -82,7 +82,7 @@ export default function general(html: string, now: number) {
$(".page_redirect > *")
.last()
.attr("href")
- ?.match(/\/trang-(\d+)/)?.[1] ?? curPage + ""
+ ?.match(/\/trang-(\d+)/)?.[1] ?? curPage + "",
)
const maxPage = Number.isNaN($maxPage) ? 1 : $maxPage
diff --git a/src/apis/truyenqqq.vn/parsers/index.ts b/src/apis/truyenqqq.vn/parsers/index.ts
index cfe86987..e98a137f 100644
--- a/src/apis/truyenqqq.vn/parsers/index.ts
+++ b/src/apis/truyenqqq.vn/parsers/index.ts
@@ -38,8 +38,8 @@ export default function index(html: string, now: number) {
// Lịch Ra Truyện Ngày 29/06/2023
const $date = new Date(
parseDate(
- $schedule.find(".time").text().trim().replace("Lịch Ra Truyện Ngày ", "")
- )
+ $schedule.find(".time").text().trim().replace("Lịch Ra Truyện Ngày ", ""),
+ ),
)
const schedule = {
date: $date.getTime(),
@@ -54,7 +54,7 @@ export default function index(html: string, now: number) {
const time = new Date(
$li.find("strong").text().trim().slice(1, -1) +
":00 " +
- `${$date.getMonth()}/${$date.getDay()}/${$date.getFullYear()}`
+ `${$date.getMonth()}/${$date.getDay()}/${$date.getFullYear()}`,
).getTime()
const release = $li.find(".hot").length > 0
$li.find("strong").remove()
diff --git a/src/apis/truyenqqq.vn/parsers/truyen-tranh/[slug]-chap-[chap].ts b/src/apis/truyenqqq.vn/parsers/truyen-tranh/[slug]-chap-[chap].ts
index 60e670a2..8f20791c 100644
--- a/src/apis/truyenqqq.vn/parsers/truyen-tranh/[slug]-chap-[chap].ts
+++ b/src/apis/truyenqqq.vn/parsers/truyen-tranh/[slug]-chap-[chap].ts
@@ -11,7 +11,7 @@ export default function chap(html: string, now: number) {
const name = $("h1 > a").text()
const updated = new Date(
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- $(".detail-title").next("time").attr("datetime")!
+ $(".detail-title").next("time").attr("datetime")!,
).getTime()
const chapters = $(".chapter_list option")
.toArray()
@@ -77,7 +77,7 @@ export const SERVERS: {
has: () => true,
get: (item) =>
`https://images2-focus-opensocial.googleusercontent.com/gadgets/proxy?container=focus&gadget=a&no_expand=1&resize_h=0&rewriteMime=image%2F*&url=${encodeURIComponent(
- item.src
+ item.src,
)}`,
},
{
@@ -93,7 +93,7 @@ export const SERVERS: {
if (item.original?.includes(host))
return item.original.replace(
host,
- replaceHosts[host as keyof typeof replaceHosts]
+ replaceHosts[host as keyof typeof replaceHosts],
)
}
return item.original
diff --git a/src/apis/truyenqqq.vn/parsers/truyen-tranh/[slug].ts b/src/apis/truyenqqq.vn/parsers/truyen-tranh/[slug].ts
index 652744a3..ebd45f66 100644
--- a/src/apis/truyenqqq.vn/parsers/truyen-tranh/[slug].ts
+++ b/src/apis/truyenqqq.vn/parsers/truyen-tranh/[slug].ts
@@ -20,10 +20,10 @@ export default function manga(html: string, now: number) {
.map((item) => parseAnchor($(item)))
const status = $(".status p:not(.name)").text().trim()
const likes = parseInt(
- $(".status").next().find("p:not(.name)").text().replace(/,/g, "")
+ $(".status").next().find("p:not(.name)").text().replace(/,/g, ""),
)
const follows = parseInt(
- $(".status").next().next().find("p:not(.name)").text().replace(/,/g, "")
+ $(".status").next().next().find("p:not(.name)").text().replace(/,/g, ""),
)
const followed = $(".btn-subscribe .fa-heart").length === 0
const views = parseInt(
@@ -33,7 +33,7 @@ export default function manga(html: string, now: number) {
.next()
.find("p:not(.name)")
.text()
- .replace(/,/g, "")
+ .replace(/,/g, ""),
)
const genres = $(".list01 a")
.toArray()
diff --git a/src/apis/truyenqqq.vn/runs/bang-xep-hang/[type].ts b/src/apis/truyenqqq.vn/runs/bang-xep-hang/[type].ts
index cd2717ff..a409370c 100644
--- a/src/apis/truyenqqq.vn/runs/bang-xep-hang/[type].ts
+++ b/src/apis/truyenqqq.vn/runs/bang-xep-hang/[type].ts
@@ -7,12 +7,12 @@ import Worker from "../../workers/[general]?worker"
export default async function (
slug: string,
page: number,
- query: LocationQuery
+ query: LocationQuery,
) {
const { data, url } = await get(
`/top-${slug.replace(".html", "")}/trang-${page}.html?${new URLSearchParams(
- query as Record
- )}`
+ query as Record,
+ )}`,
)
// eslint-disable-next-line functional/no-throw-statement
diff --git a/src/apis/truyenqqq.vn/runs/frontend/comment/list.ts b/src/apis/truyenqqq.vn/runs/frontend/comment/list.ts
index f3af5ea6..b1ed04df 100644
--- a/src/apis/truyenqqq.vn/runs/frontend/comment/list.ts
+++ b/src/apis/truyenqqq.vn/runs/frontend/comment/list.ts
@@ -7,7 +7,7 @@ import Worker from "../../../workers/comment/list?worker"
export default async function commentList(
book_id: number,
parent_id: number,
- team_id: number
+ team_id: number,
) {
const { data } = await post("/frontend/comment/list", {
book_id,
diff --git a/src/apis/truyenqqq.vn/runs/the-loai/[type].ts b/src/apis/truyenqqq.vn/runs/the-loai/[type].ts
index ecf68051..f6a4e73e 100644
--- a/src/apis/truyenqqq.vn/runs/the-loai/[type].ts
+++ b/src/apis/truyenqqq.vn/runs/the-loai/[type].ts
@@ -7,24 +7,24 @@ import Worker from "../../workers/[general]?worker"
export default async function (
slug: string,
page: number,
- query: LocationQuery
+ query: LocationQuery,
) {
const { data, url } = await get(
`/the-loai/${slug.replace(
".html",
- ""
+ "",
)}/trang-${page}.html?${new URLSearchParams(
- query as Record
- )}`
+ query as Record,
+ )}`,
)
console.log(
`/the-loai/${slug.replace(
".html",
- ""
+ "",
)}/trang-${page}.html?${new URLSearchParams(
- query as Record
- )}`
+ query as Record,
+ )}`,
)
// eslint-disable-next-line functional/no-throw-statement
if (pathIsHome(url)) throw new Error("not_found")
diff --git a/src/apis/truyenqqq.vn/runs/tim-kiem.ts b/src/apis/truyenqqq.vn/runs/tim-kiem.ts
index 7b764841..4a86ef22 100644
--- a/src/apis/truyenqqq.vn/runs/tim-kiem.ts
+++ b/src/apis/truyenqqq.vn/runs/tim-kiem.ts
@@ -5,7 +5,7 @@ import Worker from "../workers/[general]?worker"
export default async function (query: string, page: number) {
const { data } = await get(
- `/tim-kiem/trang-${page}.html?q=${encodeURIComponent(query)}`
+ `/tim-kiem/trang-${page}.html?q=${encodeURIComponent(query)}`,
)
return PostWorker(Worker, data, Date.now())
diff --git a/src/apis/truyenqqq.vn/runs/truyen-tranh/[slug]-chap-[chap].ts b/src/apis/truyenqqq.vn/runs/truyen-tranh/[slug]-chap-[chap].ts
index a1021dea..e89bd397 100644
--- a/src/apis/truyenqqq.vn/runs/truyen-tranh/[slug]-chap-[chap].ts
+++ b/src/apis/truyenqqq.vn/runs/truyen-tranh/[slug]-chap-[chap].ts
@@ -20,7 +20,7 @@ export default async function (slug: string) {
result.chapters = await PostWorker(
WorkerMangaList,
- data
+ data,
)
}
diff --git a/src/apis/wrap-worker.ts b/src/apis/wrap-worker.ts
index f5453493..c599d3fc 100644
--- a/src/apis/wrap-worker.ts
+++ b/src/apis/wrap-worker.ts
@@ -13,13 +13,13 @@ export function WrapWorker any>(fn: Fn) {
event: MessageEvent<{
id: string
args: unknown[]
- }>
+ }>,
) => {
postMessage({
id: event.data.id,
result: fn(...event.data.args),
})
- }
+ },
)
}
export function PostWorker any>(
diff --git a/src/boot/i18n.ts b/src/boot/i18n.ts
index 5b315ace..8f1e3d58 100644
--- a/src/boot/i18n.ts
+++ b/src/boot/i18n.ts
@@ -37,7 +37,7 @@ export default boot(({ app }) => {
i18n.global.setLocaleMessage(locale, messages)
;(i18n.global.locale as Ref).value = locale
},
- { immediate: true }
+ { immediate: true },
)
// Set i18n instance on app
app.use(i18n)
diff --git a/src/components/Card.vue b/src/components/Card.vue
index 89dee71f..0c61f2a2 100644
--- a/src/components/Card.vue
+++ b/src/components/Card.vue
@@ -147,10 +147,10 @@ const enablePopup = props.data.views !== null
if (enablePopup) {
const mouseInCard = useElementHover(
- imgRef as unknown as MaybeComputedRef
+ imgRef as unknown as MaybeComputedRef,
)
const mouseInCardMenu = useElementHover(
- cardMenuRef as unknown as MaybeComputedRef
+ cardMenuRef as unknown as MaybeComputedRef,
)
const showMenu = debounce(() => {
@@ -163,7 +163,7 @@ if (enablePopup) {
showMenu.cancel()
if (outsideCard || outsideCardMenu) showMenu()
else menuRef.value?.hide()
- }, 10)
+ }, 10),
)
}
diff --git a/src/components/ImageView.vue b/src/components/ImageView.vue
index 4e3a6340..5592650b 100644
--- a/src/components/ImageView.vue
+++ b/src/components/ImageView.vue
@@ -38,7 +38,7 @@ watch(
srcImage.value = src
}
},
- { immediate: true }
+ { immediate: true },
)
diff --git a/src/components/app/AppHeaderFollows.vue b/src/components/app/AppHeaderFollows.vue
index 380c7e39..39149885 100644
--- a/src/components/app/AppHeaderFollows.vue
+++ b/src/components/app/AppHeaderFollows.vue
@@ -136,7 +136,7 @@ async function refresh(type: string) {
1,
authStore.user_data.uid,
authStore.user_data.token,
- type
+ type,
),
})
} catch (err) {
diff --git a/src/components/app/AppHeaderHistory.vue b/src/components/app/AppHeaderHistory.vue
index f471d3ba..d9447fb2 100644
--- a/src/components/app/AppHeaderHistory.vue
+++ b/src/components/app/AppHeaderHistory.vue
@@ -89,7 +89,7 @@ const { loading, data, refreshAsync } = useRequest(
manual: true,
cacheKey: "history",
cacheTime: 5 * 60 * 1000, //
- }
+ },
)
const onLoad = useLoadMorePage((page) => {
// eslint-disable-next-line functional/no-throw-statement
diff --git a/src/components/app/AppHeaderSearchMB.vue b/src/components/app/AppHeaderSearchMB.vue
index 4638ecb4..6be58299 100644
--- a/src/components/app/AppHeaderSearchMB.vue
+++ b/src/components/app/AppHeaderSearchMB.vue
@@ -136,7 +136,7 @@ function onBack() {
}
function onClickItemPreLoad(
item: Exclude[0],
- load?: boolean
+ load?: boolean,
) {
if (load) {
query.value = item.name
diff --git a/src/components/library/LibraryTabFollows.vue b/src/components/library/LibraryTabFollows.vue
index b5dde442..ef998fcc 100644
--- a/src/components/library/LibraryTabFollows.vue
+++ b/src/components/library/LibraryTabFollows.vue
@@ -98,10 +98,10 @@ const onLoads = types.map(({ value }) => {
page,
authStore.user_data.uid,
authStore.user_data.token,
- value
+ value,
)
},
- computed(() => (datas.get(value) as DataSuccess)?.data)
+ computed(() => (datas.get(value) as DataSuccess)?.data),
)
})
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -115,7 +115,7 @@ watch(
await refresh(type)
},
- { immediate: true }
+ { immediate: true },
)
async function refresh(type: string) {
datas.delete(type)
@@ -127,7 +127,7 @@ async function refresh(type: string) {
1,
authStore.user_data.uid,
authStore.user_data.token,
- type
+ type,
)
data.items = shallowReactive(data.items)
datas.set(type, {
diff --git a/src/components/library/LibraryTabHistory.vue b/src/components/library/LibraryTabHistory.vue
index 094049c1..0414cbb7 100644
--- a/src/components/library/LibraryTabHistory.vue
+++ b/src/components/library/LibraryTabHistory.vue
@@ -46,7 +46,7 @@ const { loading, data, refreshAsync } = useRequest(async () => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
item.read_at = dayjs(item.read_at) as unknown as any
return item
- })
+ }),
)
return data as unknown as Omit & {
items: (Omit<(typeof data.items)[0], "read_at"> & {
diff --git a/src/components/library/LibraryTabOffline.vue b/src/components/library/LibraryTabOffline.vue
index 8b315aaf..0c354040 100644
--- a/src/components/library/LibraryTabOffline.vue
+++ b/src/components/library/LibraryTabOffline.vue
@@ -246,13 +246,13 @@ watch(
console.log(meta)
if (meta) {
listEpDownloaded.value = shallowReactive(
- await getListEpisodes(meta.manga_id).catch(() => [])
+ await getListEpisodes(meta.manga_id).catch(() => []),
).map((ref) => ({ ref }))
} else {
listEpDownloaded.value = undefined
}
},
- { immediate: true }
+ { immediate: true },
)
const listEpDownloading = computed(() => {
@@ -268,7 +268,7 @@ const list = computed(() => {
return new Map(
[...(listEpDownloaded.value ?? []), ...listEpDownloading.value]
.sort((a, b) => b.ref.start_download_at - a.ref.start_download_at)
- .map((item) => [item.ref.ep_id, item])
+ .map((item) => [item.ref.ep_id, item]),
) as Map<
number,
{
@@ -284,7 +284,7 @@ async function resume(
| Awaited>
| {
ref: MetaEpisodeOnDisk
- }
+ },
) {
if (!metaMangaShowInfo.value || !listEpDownloaded.value) return
@@ -293,10 +293,10 @@ async function resume(
listEpDownloaded.value.splice(
listEpDownloaded.value.findIndex(
- (item) => item.ref.ep_id === result.ref.ep_id
+ (item) => item.ref.ep_id === result.ref.ep_id,
) >>> 0,
1,
- result
+ result,
)
} catch (err) {
if ((err as Error | undefined)?.message === "user_paused") return
@@ -320,7 +320,7 @@ async function remove() {
// eslint-disable-next-line camelcase
listEpRemove.value.map(async (ep_id) => {
await IDMStore.deleteEpisode(manga_id, ep_id)
- })
+ }),
)
const storeTask = IDMStore.queue.get(manga_id)
@@ -338,7 +338,7 @@ async function remove() {
if (list.value?.size === 0) {
IDMStore.listMangaSorted.splice(
IDMStore.listMangaSorted.indexOf(meta) >>> 0,
- 1
+ 1,
)
}
@@ -392,7 +392,7 @@ async function download() {
for (const ep of epsSelected) {
const conf = await SlugChapChap(
ep.path.split("/").slice(2).join("/"),
- false
+ false,
)
// eslint-disable-next-line promise/catch-or-return
IDMStore.download(metaMangaShowInfo.value, {
@@ -404,10 +404,10 @@ async function download() {
if (listEpDownloaded.value)
listEpDownloaded.value.splice(
listEpDownloaded.value.findIndex(
- (item) => item.ref.ep_id === result.ref.ep_id
+ (item) => item.ref.ep_id === result.ref.ep_id,
) >>> 0,
1,
- result
+ result,
)
// eslint-disable-next-line no-useless-return
return
diff --git a/src/components/the-loai/GenresFilterMB.vue b/src/components/the-loai/GenresFilterMB.vue
index 2d3d4b17..0224d2cb 100644
--- a/src/components/the-loai/GenresFilterMB.vue
+++ b/src/components/the-loai/GenresFilterMB.vue
@@ -64,7 +64,7 @@
:class="{
'!text-main-3': pathEqual(
router.resolve(path).path,
- route.path
+ route.path,
),
}"
>
@@ -155,7 +155,7 @@
:class="{
'!text-main': pathEqual(
router.resolve(path).path,
- route.path
+ route.path,
),
}"
>
diff --git a/src/components/the-loai/GenresFilterNative.vue b/src/components/the-loai/GenresFilterNative.vue
index 21c01f8b..e27c0de2 100644
--- a/src/components/the-loai/GenresFilterNative.vue
+++ b/src/components/the-loai/GenresFilterNative.vue
@@ -41,7 +41,7 @@
:class="{
'!text-main-3': pathEqual(
router.resolve(path).path,
- route.path
+ route.path,
),
}"
>{{ name }} {
- if (tabActive === index) btnActiveRef = $el
- }"
+ :ref="
+ ($el: QTab) => {
+ if (tabActive === index) btnActiveRef = $el
+ }
+ "
/>