mirror of
https://github.com/kodjodevf/mangayomi-extensions.git
synced 2026-02-17 20:30:33 +00:00
extension(mangapill): Added search
This commit is contained in:
@@ -6,10 +6,10 @@ const mangayomiSources = [{
|
|||||||
"iconUrl": "https://www.google.com/s2/favicons?sz=64&domain=https://mangapill.com/",
|
"iconUrl": "https://www.google.com/s2/favicons?sz=64&domain=https://mangapill.com/",
|
||||||
"typeSource": "single",
|
"typeSource": "single",
|
||||||
"isManga": true,
|
"isManga": true,
|
||||||
"version": "0.0.1",
|
"version": "0.0.2",
|
||||||
"dateFormat": "",
|
"dateFormat": "",
|
||||||
"dateFormatLocale": "",
|
"dateFormatLocale": "",
|
||||||
"pkgPath": ""
|
"pkgPath": "manga/src/en/mangapill.js"
|
||||||
}];
|
}];
|
||||||
|
|
||||||
class DefaultExtension extends MProvider {
|
class DefaultExtension extends MProvider {
|
||||||
@@ -42,6 +42,9 @@ class DefaultExtension extends MProvider {
|
|||||||
list.push({ name, imageUrl, link });
|
list.push({ name, imageUrl, link });
|
||||||
}
|
}
|
||||||
var hasNextPage = false;
|
var hasNextPage = false;
|
||||||
|
if (slug.includes("search?q")) {
|
||||||
|
hasNextPage = doc.selectFirst(".container.py-3 a.btn.btn-sm").className ? true : false
|
||||||
|
}
|
||||||
return { list, hasNextPage }
|
return { list, hasNextPage }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,8 +73,13 @@ class DefaultExtension extends MProvider {
|
|||||||
async getLatestUpdates(page) {
|
async getLatestUpdates(page) {
|
||||||
return await this.getNavPage("pref_latest_content");
|
return await this.getNavPage("pref_latest_content");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async searchManga(query, status, type, page) {
|
||||||
|
var slug = `search?q=${query}&status=${status}&type=${type}&page=${page}`
|
||||||
|
return await this.getMangaList(slug)
|
||||||
|
}
|
||||||
async search(query, page, filters) {
|
async search(query, page, filters) {
|
||||||
throw new Error("search not implemented");
|
return await this.searchManga(query, "", "", page);
|
||||||
}
|
}
|
||||||
async getDetail(url) {
|
async getDetail(url) {
|
||||||
throw new Error("getDetail not implemented");
|
throw new Error("getDetail not implemented");
|
||||||
|
|||||||
Reference in New Issue
Block a user