Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
dd8f21c
novel-updates: plugin update
Batorian Mar 7, 2025
18f3089
novel-updates: update
Batorian Mar 7, 2025
82621e1
novel-updates: update
Batorian Mar 7, 2025
edd01d0
novel-updates: update
Batorian Mar 7, 2025
be1dc9f
novel-updates: update
Batorian Mar 7, 2025
07dcf61
novel-updates: update
Batorian Mar 7, 2025
649f585
novel-updates: update
Batorian Mar 7, 2025
34a84fe
novel-updates: update
Batorian Mar 7, 2025
188144c
novel-updates: update
Batorian Mar 7, 2025
cc094b7
novel-updates: update
Batorian Mar 7, 2025
19465df
novel-updates: update
Batorian Mar 7, 2025
83adb54
novel-updates: update
Batorian Mar 7, 2025
ab722d8
novel-updates: update
Batorian Mar 7, 2025
83bb33e
novel-updates: update
Batorian Mar 7, 2025
26318a8
novel-updates: update
Batorian Mar 7, 2025
b387d88
Merge branch 'LNReader:master' into novel-updates
Batorian Mar 12, 2025
1132c5b
Merge branch 'master' into novel-updates
Batorian Mar 17, 2025
d3f7640
Merge branch 'master' into novel-updates
Batorian Mar 19, 2025
65a7dbb
chapter-sync: update test version
Batorian Mar 19, 2025
4bb6426
chapter-sync: update
Batorian Mar 19, 2025
5e05493
chapter-sync: update
Batorian Mar 19, 2025
16d0eb9
chapter-sync: update
Batorian Mar 19, 2025
afc64fe
novel-updates: update
Batorian Mar 19, 2025
3579685
novel-updates: update
Batorian Mar 19, 2025
b3db0e1
novel-updates: update
Batorian Mar 19, 2025
bfe1285
novel-updates: update
Batorian Mar 19, 2025
854e4fc
novel-updates: update
Batorian Mar 19, 2025
9f5a430
novel-updates: update
Batorian Mar 19, 2025
95fe72c
novel-updates: update
Batorian Mar 19, 2025
d2b6bcb
novel-updates: update
Batorian Mar 19, 2025
714b07d
novel-updates: update
Batorian Mar 19, 2025
9916836
novel-updates: update
Batorian Mar 19, 2025
4fd68a5
novel-updates: update
Batorian Mar 19, 2025
35e5caf
novel-updates: update
Batorian Mar 19, 2025
e10c363
novel-updates: update
Batorian Mar 19, 2025
050ad96
novel-updates: update
Batorian Mar 19, 2025
6a76380
novel-updates: update
Batorian Mar 19, 2025
ff6d80a
novel-updates: revert test version
Batorian Mar 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions src/plugins/english/genesis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Genesis implements Plugin.PluginBase {
icon = 'src/en/genesis/icon.png';
customCSS = 'src/en/genesis/customCSS.css';
site = 'https://genesistudio.com';
version = '1.1.1';
version = '1.1.2';

imageRequestInit?: Plugin.ImageRequestInit | undefined = {
headers: {
Expand Down Expand Up @@ -421,6 +421,7 @@ class Genesis implements Plugin.PluginBase {
// Extract the main novel data from the nodes
const data = this.extractData(nodes);

// Look for chapter container with required fields
const contentKey = 'content';
const notesKey = 'notes';
const footnotesKey = 'footnotes';
Expand All @@ -429,29 +430,24 @@ class Genesis implements Plugin.PluginBase {
for (const key in data) {
const mapping = data[key];

// Look for an object with a 'chapters' key
// Check container for keys that match the required fields
if (
mapping &&
typeof mapping === 'object' &&
contentKey in mapping &&
notesKey in mapping &&
footnotesKey in mapping
) {
// Use the found mapping object to determine the actual keys.
const contentMappingKey = mapping[contentKey];
const notesMappingKey = mapping[notesKey];
const footnotesMappingKey = mapping[footnotesKey];

// Retrieve the chapter's content, notes, and footnotes using the mapping.
// Provide a fallback for content if needed.
const content = data[contentMappingKey] ?? data[19];
const notes = data[notesMappingKey];
const footnotes = data[footnotesMappingKey];
const content = data[mapping[contentKey]];
const notes = data[mapping[notesKey]];
const footnotes = data[mapping[footnotesKey]];

// Return the combined parts with appropriate formatting
return (
content +
(notes ? `<b>Notes</b><br>${notes}` : '') +
(footnotes ? `<b>Footnotes</b><br>${footnotes}` : '')
(notes ? `<h2>Notes</h2><br>${notes}` : '') +
(footnotes ?? '')
);
}
}
Expand Down
Loading