From ace5f655df3f6eb76310c39dbc6ed2ef60f49dce Mon Sep 17 00:00:00 2001 From: Vaibhav <183315953+D3ICIDE@users.noreply.github.com> Date: Mon, 21 Sep 2026 16:17:27 +0530 Subject: [PATCH] Added Chapter Title as heading in Chapters (#2538) --- plugins/english/wtrlab.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins/english/wtrlab.ts b/plugins/english/wtrlab.ts index 8df41de..f420242 100644 --- a/plugins/english/wtrlab.ts +++ b/plugins/english/wtrlab.ts @@ -9,7 +9,7 @@ class WTRLAB implements Plugin.PluginBase { id = 'WTRLAB'; name = 'WTR-LAB'; site = 'https://wtr-lab.com/'; - version = '1.2.0'; + version = '1.2.1'; icon = 'src/en/wtrlab/icon.png'; sourceLang = 'en/'; baggage = ''; @@ -546,7 +546,7 @@ class WTRLAB implements Plugin.PluginBase { combined = new Uint8Array(ciphertext.length + tag.length); // Make the ciphertext + tag format expected for decryption - (combined.set(ciphertext), combined.set(tag, ciphertext.length)); + combined.set(ciphertext), combined.set(tag, ciphertext.length); // Decrypt with encKey // Convert the key to bytes (first 32 characters of encKey) @@ -768,11 +768,15 @@ class WTRLAB implements Plugin.PluginBase { console.error(errorMsg); throw new Error(errorMsg); } - let chapterContent = parsedJson.data.data.body; + let chapterContent: any = parsedJson.data.data.body; + const chapterTitle: string | undefined = parsedJson?.chapter?.title; const chapterGlossary: ChapterContent['glossary_data'] | undefined = parsedJson?.data?.data?.glossary_data; let htmlString = ''; + if (chapterTitle) { + htmlString += `

${chapterTitle}

`; + } if ( chapterContent.toString().startsWith('arr:') ||