Feat: ImageRequestInit (#979)

* add ImageRequestInit & fix Hako

* remove multisrc fetchFile

* remove plugins fetchFile

* update docs and template file
This commit is contained in:
nyagami
2024-06-08 20:09:33 +07:00
committed by GitHub
parent 6062f51460
commit 60d95fb8d2
85 changed files with 441 additions and 692 deletions
-2
View File
@@ -250,8 +250,6 @@ class ChireadsPlugin implements Plugin.PluginBase {
return novels;
}
fetchImage = fetchFile;
filters = {
tag: {
type: FilterTypes.Picker,
-6
View File
@@ -173,12 +173,6 @@ class HarkenEliwoodPlugin implements Plugin.PluginBase {
return novels;
}
async fetchImage(url: string): Promise<string | undefined> {
// if your plugin has images and they won't load
// this is the function to fiddle with
return fetchFile(url);
}
}
export default new HarkenEliwoodPlugin();
-2
View File
@@ -292,8 +292,6 @@ class NovelDeGlacePlugin implements Plugin.PluginBase {
return novels;
}
fetchImage = fetchFile;
filters = {
categorie_genre: {
type: FilterTypes.Picker,
-6
View File
@@ -202,12 +202,6 @@ class NovhellPlugin implements Plugin.PluginBase {
return novels;
}
async fetchImage(url: string): Promise<string | undefined> {
// if your plugin has images and they won't load
// this is the function to fiddle with
return fetchFile(url);
}
}
export default new NovhellPlugin();
-7
View File
@@ -172,13 +172,6 @@ class PhenixScansTradPlugin implements Plugin.PluginBase {
return novels;
}
async fetchImage(url: string): Promise<string | undefined> {
const headers = new Headers({
'Referer': `${this.site}`,
});
return await fetchFile(url, { headers });
}
filters = {
genre: {
type: FilterTypes.CheckboxGroup,
-6
View File
@@ -193,12 +193,6 @@ class WarriorLegendTradPlugin implements Plugin.PluginBase {
return novels;
}
async fetchImage(url: string): Promise<string | undefined> {
// if your plugin has images and they won't load
// this is the function to fiddle with
return fetchFile(url);
}
}
export default new WarriorLegendTradPlugin();
-6
View File
@@ -211,12 +211,6 @@ class WuxialnscantradPlugin implements Plugin.PluginBase {
return novels;
}
async fetchImage(url: string): Promise<string | undefined> {
// if your plugin has images and they won't load
// this is the function to fiddle with
return fetchFile(url);
}
}
export default new WuxialnscantradPlugin();
-6
View File
@@ -293,12 +293,6 @@ class XiaowazPlugin implements Plugin.PluginBase {
return await this.getNovelsCovers(novels);
}
async fetchImage(url: string): Promise<string | undefined> {
// if your plugin has images and they won't load
// this is the function to fiddle with
return fetchFile(url);
}
}
export default new XiaowazPlugin();