Feat: ImageRequestInit (#979)
* add ImageRequestInit & fix Hako * remove multisrc fetchFile * remove plugins fetchFile * update docs and template file
This commit is contained in:
@@ -14,6 +14,7 @@ class TemplatePlugin implements Plugin.PluginBase {
|
||||
site = 'https://example.com';
|
||||
version = '1.0.0';
|
||||
filters: Filters | undefined = undefined;
|
||||
imageRequestInit?: Plugin.ImageRequestInit | undefined = undefined;
|
||||
|
||||
async popularNovels(
|
||||
pageNo: number,
|
||||
@@ -80,11 +81,6 @@ class TemplatePlugin 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 TemplatePlugin();
|
||||
|
||||
Reference in New Issue
Block a user