[nhentai] fix cover

This commit is contained in:
2025-08-03 17:26:29 +08:00
parent ccc157b4f2
commit ee0a98ec33
2 changed files with 21 additions and 2 deletions

View File

@@ -27,7 +27,7 @@
"name": "nhentai", "name": "nhentai",
"fileName": "nhentai.js", "fileName": "nhentai.js",
"key": "nhentai", "key": "nhentai",
"version": "1.0.4" "version": "1.0.5"
}, },
{ {
"name": "紳士漫畫", "name": "紳士漫畫",

View File

@@ -7,7 +7,7 @@ class Nhentai extends ComicSource {
// unique id of the source // unique id of the source
key = "nhentai" key = "nhentai"
version = "1.0.4" version = "1.0.5"
minAppVersion = "1.0.0" minAppVersion = "1.0.0"
@@ -328,6 +328,25 @@ class Nhentai extends ComicSource {
/// single comic related /// single comic related
comic = { comic = {
/**
* [Optional] provide configs for a thumbnail loading
* @param url {string}
* @returns {ImageLoadingConfig | Promise<ImageLoadingConfig>}
*
* `ImageLoadingConfig.modifyImage` and `ImageLoadingConfig.onLoadFailed` will be ignored.
* They are not supported for thumbnails.
*/
onThumbnailLoad: (url) => {
if(url.startsWith("//")) {
url = "https:" + url
} else if(!url.startsWith("http")) {
url = "https://" + url
}
return {
url: url,
}
},
/** /**
* load comic info * load comic info
* @param id {string} * @param id {string}