Conversation
Add Maehwasup, Hen Novel Translations and Machine Editing (MyLasted) with complete public chapter indexes and source icons. Prepared with OpenAI Codex assistance; app behavior verified by the contributor.
|
| body | ||
| .find('script,style,iframe,form,button,.episode-navigation,.adsbygoogle') | ||
| .remove(); | ||
| body.find('[style]').removeAttr('style'); | ||
| if (body.text().trim().length < 200) | ||
| throw new Error( | ||
| 'Hen Novel Translations: no readable public chapter was found.', | ||
| ); | ||
| return body.html()!; |
There was a problem hiding this comment.
All three new chapter parsers leave event-handler attributes in the HTML they return. If a publisher adds a handler to a chapter, the reader inserts it without cleaning it, so the publisher's code can run when someone opens the chapter. Remove unsafe attributes and links before returning the HTML.
How this was verified: The parsers return remote HTML with event handlers intact, and the reader inserts it with dangerouslySetInnerHTML.
| const url = new URL(this.resolveUrl(link.attr('href')!)); | ||
| if (!url.pathname.startsWith('/episodes/') || seen[url.pathname]) return; | ||
| seen[url.pathname] = true; | ||
| const title = link.text().trim(); | ||
| const number = /(?:episode|chapter)\s+(\d+(?:\.\d+)?)/i.exec(title); | ||
| const row = link.closest('li'); | ||
| chapters.push({ | ||
| name: title, | ||
| path: url.pathname, | ||
| chapterNumber: number ? Number(number[1]) : undefined, | ||
| releaseTime: row.find('time').attr('datetime'), | ||
| }); | ||
| }); | ||
| chapters.reverse(); | ||
| if (!chapters.length) |
There was a problem hiding this comment.
| chapters.sort((a, b) => { | ||
| if (a.chapterNumber !== undefined && b.chapterNumber !== undefined) | ||
| return a.chapterNumber - b.chapterNumber; | ||
| return (a.releaseTime || '').localeCompare(b.releaseTime || ''); | ||
| }); |
There was a problem hiding this comment.
MyLasted compares chapter numbers when both entries have one, but switches to dates when either lacks one. If a prologue or side story is published later, those rules can disagree and put it in the wrong reading position. Use one consistent rule for the whole list.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Sanitize chapter HTML, validate every supplied Hen free-list row including query-addressed episodes, and use deterministic mixed-chapter ordering for MyLasted. Bump all three to 1.0.1. Prepared with OpenAI Codex assistance; validated with live checks and targeted regression fixtures.
Adds three English sources: Maehwasup, Hen Novel Translations, and Machine Editing (MyLasted). Each plugin supports catalogue/search, novel details, complete public chapter lists, and chapter reading through LNReader's normal fetching helpers.
/episodes/permalinks and WordPress query-addressed episodes are retained with distinct identities.All three include 96×96 icons, clean navigation/advertising from chapter bodies, validate destination URLs, and reject malformed or repeated index entries instead of returning a partial chapter list. The sites' custom layouts do not match an existing multisrc template. None of these sources is in BLACKLIST.json.
Review fixes (version 1.0.1)
Hen currently supplies its free list inline without an independent free-chapter total. The plugin validates the full supplied list; it cannot detect unadvertised server-side omissions. The Korean-series total is not a free-chapter total. Six query-addressed Barbarian entries (584, 585, 589, 598, 599, 600) currently return site-side 404s. They remain represented in the source list, and attempting to read one reports HTTP 404 instead of treating an error page as chapter content.
Validation
check:pluginpasses catalogue, search, novel parsing and chapter reading for all three sources.Checklist
feat(english): add three translation sources.Implementation and submission prepared with OpenAI Codex assistance; app testing was performed by the contributor.