Add TopLiba (#1003)

* test

* cleanup

deleted unused `fetchFile` import
replaced fetch with `fetchApi`

* eslint

* fix

* fix multi

* Hmm, what to do next.

* test URLSearchParams

* fix
This commit is contained in:
Rider21
2024-06-30 07:28:11 +03:00
committed by GitHub
parent 938e3b16a3
commit fae73534dd
121 changed files with 10534 additions and 8079 deletions
+1 -13
View File
@@ -84,18 +84,6 @@ export namespace Plugin {
parseNovel(novelPath: string): Promise<SourceNovel>;
parseChapter(chapterPath: string): Promise<string>;
searchNovels(searchTerm: string, pageNo: number): Promise<NovelItem[]>;
/**
*
* @param url Image url
* @returns {Promise<string|undefined>} Base64 of image
* @example
* ```ts
* const headers = {
* Referer: "https://ln.hako.vn",
* };
* return await fetchFile(url, { headers: headers });
* ```
*/
resolveUrl?(path: string, isNovel?: boolean): string;
}
@@ -109,7 +97,7 @@ export namespace Plugin {
export namespace HTMLParser2Util {
interface HandlerBase {
onopentag?(name: string, attribs: { [s: string]: string }): void;
onopentag?(name: string, attribs: Record<string, string>): void;
ontext?(data: string): void;
onclosetag?(name: string, isImplied: boolean): void;
}
+1 -3
View File
@@ -1,5 +1,3 @@
import { Plugin } from '@typings/plugin';
export type PluginList = {
[key: string]: Plugin.PluginItem[];
};
export type PluginList = Record<string, Plugin.PluginItem[]>;