fix(fenrirrealm): fixed broken webview (#2366)

Co-authored-by: D3ICIDE <D3ICIDE@users.noreply.github.com>
This commit is contained in:
Vaibhav
2026-08-01 10:45:16 +05:30
committed by GitHub
parent 3237dc8c30
commit e90f066c59
+17 -5
View File
@@ -75,7 +75,7 @@ class FenrirRealmPlugin implements Plugin.PluginBase {
name = 'Fenrir Realm'; name = 'Fenrir Realm';
icon = 'src/en/fenrirrealm/icon.png'; icon = 'src/en/fenrirrealm/icon.png';
site = 'https://fenrirealm.com'; site = 'https://fenrirealm.com';
version = '1.1.1'; version = '1.1.2';
imageRequestInit?: Plugin.ImageRequestInit | undefined = undefined; imageRequestInit?: Plugin.ImageRequestInit | undefined = undefined;
hideLocked = storage.get('hideLocked'); hideLocked = storage.get('hideLocked');
@@ -304,9 +304,20 @@ class FenrirRealmPlugin implements Plugin.PluginBase {
const loadedCheerio = loadCheerio(body); const loadedCheerio = loadCheerio(body);
let chapterText = loadedCheerio('div.content-area p') // Clean up anti-scraping and watermark elements first
.map((_, el) => `<p>${loadCheerio(el).html()}</p>`) loadedCheerio('[aria-hidden="true"]').remove();
loadedCheerio('.reader-attribution').remove();
loadedCheerio('[data-fr-attr]').remove();
let chapterText = loadedCheerio(
'.reader-area p, div.content-area p, [id^="reader-area"] p',
)
.map((_, el) => {
const html = loadedCheerio(el).html()?.trim();
return html ? `<p>${html}</p>` : '';
})
.get() .get()
.filter(Boolean)
.join('\n'); .join('\n');
if (chapterText) { if (chapterText) {
@@ -400,8 +411,9 @@ class FenrirRealmPlugin implements Plugin.PluginBase {
}; };
} }
// resolveUrl = (path: string, isNovel?: boolean) => resolveUrl(path: string): string {
// this.site + '/series/' + path.split('~~')[0]; return `${this.site}/series/${path.split('~~')[0]}`;
}
filters = { filters = {
status: { status: {