Removed illustration pre-processing(#1144)

This commit is contained in:
Rider21
2024-08-18 13:52:14 +03:00
committed by GitHub
parent 7e98a91ef6
commit eb5522b066
7 changed files with 3 additions and 46 deletions
+1 -2
View File
@@ -152,8 +152,7 @@ class IfreedomPlugin implements Plugin.PluginBase {
.pop();
if (bestlink) {
if (bestlink.startsWith('http')) return `src="${bestlink}"`;
return `src="${this.site}${bestlink}"`;
return `src="${bestlink}"`;
}
return match;
});
-7
View File
@@ -192,13 +192,6 @@ class RulatePlugin implements Plugin.PluginBase {
const body = await result.text();
const loadedCheerio = parseHTML(body);
loadedCheerio('.content-text img').each((index, element) => {
if (!loadedCheerio(element).attr('src')?.startsWith('http')) {
const src = loadedCheerio(element).attr('src');
loadedCheerio(element).attr('src', this.site + src);
}
});
const chapterText = loadedCheerio('.content-text').html();
return chapterText || '';
}