From d48c3ef8f9a1f1a79393b62e426c93bc50bafa88 Mon Sep 17 00:00:00 2001 From: Rojikku Date: Wed, 24 Dec 2025 14:59:47 -0500 Subject: [PATCH] Fix (novelight): Deslash chapter URLs) --- plugins/english/novelight.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/english/novelight.ts b/plugins/english/novelight.ts index 9f23e9cef..ffe890e7e 100644 --- a/plugins/english/novelight.ts +++ b/plugins/english/novelight.ts @@ -10,7 +10,7 @@ import { storage } from '@libs/storage'; class Novelight implements Plugin.PagePlugin { id = 'novelight'; name = 'Novelight'; - version = '1.1.2'; + version = '1.1.3'; icon = 'src/en/novelight/icon.png'; site = 'https://novelight.net/'; @@ -187,7 +187,10 @@ class Novelight implements Plugin.PagePlugin { } catch (error) {} const chapterName = isLocked ? '🔒 ' + title : title; - const chapterUrl = ele.attribs.href; + let chapterUrl = ele.attribs.href; + if (chapterUrl.charAt(0) == '/') { + chapterUrl = chapterUrl.substring(1); + } chapter.push({ name: chapterName, path: chapterUrl, @@ -201,6 +204,9 @@ class Novelight implements Plugin.PagePlugin { } async parseChapter(chapterPath: string): Promise { + if (chapterPath.charAt(0) == '/') { + chapterPath = chapterPath.substring(1); + } const rawBody = await fetchApi(this.site + chapterPath).then(r => { const res = r.text(); return res;