From b9f0e1b0d310a7ea95f70002b2bc0ce0c034c278 Mon Sep 17 00:00:00 2001 From: Batorian <53831711+Batorian@users.noreply.github.com> Date: Sat, 2 Nov 2024 13:56:30 +0100 Subject: [PATCH] fix: [Novel Updates]: iNovelTranslation (#1287) * novel_updates: iNovelTranslation fix * novel_updates: version --- src/plugins/english/novelupdates.ts | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/plugins/english/novelupdates.ts b/src/plugins/english/novelupdates.ts index c3f84c3..43fb0d4 100644 --- a/src/plugins/english/novelupdates.ts +++ b/src/plugins/english/novelupdates.ts @@ -6,7 +6,7 @@ import { Plugin } from '@typings/plugin'; class NovelUpdates implements Plugin.PluginBase { id = 'novelupdates'; name = 'Novel Updates'; - version = '0.7.10'; + version = '0.7.11'; icon = 'src/en/novelupdates/icon.png'; customCSS = 'src/en/novelupdates/customCSS.css'; site = 'https://www.novelupdates.com/'; @@ -327,17 +327,9 @@ class NovelUpdates implements Plugin.PluginBase { chapterText = `

${chapterTitle}



${chapterContent}`; break; case 'inoveltranslation': - const link_inovel = 'https://api.' + url.slice(8); - const json_inovel = await fetchApi(link_inovel).then(r => r.json()); - chapterTitle = - 'Chapter ' + json_inovel.chapter + ' | ' + json_inovel.title; - chapterContent = json_inovel.content.replace(/\n/g, '
'); - if (json_inovel.notes) { - chapterContent += - '


TL Notes:
' + - json_inovel.notes.replace(/\n/g, '
'); - } - chapterText = `

${chapterTitle}



${chapterContent}`; + bloatElements = ['header', 'section']; + bloatElements.forEach(tag => loadedCheerio(tag).remove()); + chapterText = loadedCheerio('.styles_content__JHK8G').html()!; break; case 'isotls': // mii translates bloatElements = [