Added Chapter Title as heading in Chapters (#2538)
This commit is contained in:
@@ -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 += `<h3>${chapterTitle}</h3>`;
|
||||
}
|
||||
|
||||
if (
|
||||
chapterContent.toString().startsWith('arr:') ||
|
||||
|
||||
Reference in New Issue
Block a user