From 26a0f25b3d9c687bd47c2ac6fd2708194136d4c5 Mon Sep 17 00:00:00 2001 From: Rojikku Date: Sat, 10 Jan 2026 00:49:30 -0500 Subject: [PATCH] fix: Remove Tags From Text (#1972) * Fix (novelfire): Remove plugs * Fix (novelfire): Remove plugs 2.0 --- plugins/english/novelfire.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/plugins/english/novelfire.ts b/plugins/english/novelfire.ts index 5c19088..d019e0f 100644 --- a/plugins/english/novelfire.ts +++ b/plugins/english/novelfire.ts @@ -8,7 +8,7 @@ import { defaultCover } from '@/types/constants'; class NovelFire implements Plugin.PluginBase { id = 'novelfire'; name = 'Novel Fire'; - version = '1.1.4'; + version = '1.1.5'; icon = 'src/en/novelfire/icon.png'; site = 'https://novelfire.net/'; @@ -195,8 +195,13 @@ class NovelFire implements Plugin.PluginBase { const loadedCheerio = await this.getCheerio(url, false); const chapterText = loadedCheerio('#content'); - - loadedCheerio(chapterText).find('div').remove(); + const odds = chapterText.find(':not(p, h1, span, i, b, u, img, a, div)'); + for (const ele of odds.toArray()) { + const tag = ele.name.toString(); + if (tag.length > 5) { + loadedCheerio(ele).remove(); + } + } return chapterText.html()?.replace(/ /g, ' ') || ''; }