feat: Add TruyenSS (#2192)

* Add TruyenSS Vietnamese source for truyenss.com

Implements novel pages, hash-style chapter list, POST chapter loader
(/layout/xem-chuong.php), genre filters for popular listings, and
multi-pattern search. Includes saved HTML fixtures used for selectors.

* fix(truyenss): fetch chapter HTML via GET like the site

TruyenSS loads chapters with jQuery $.ajax, which defaults to GET.
POST to xem-chuong.php returns an empty body, causing empty chapter
errors in the app while WebView (GET + hash) still worked.

Bump plugin version to 1.0.1.

* fix(truyenss): address PR review — version 1.0.0, defaultCover, cleanup

Remove README note and truyenss HTML fixtures. Drop unused resolveUrl and
full-URL handling in parseNovel. Use defaultCover for listing items and when
novel page has no cover image.

* fix(truyenss): browse list covers — scrape thumbs, stable placeholder URL

LNReader applies plugin Referer headers to browse tiles; external blob
placeholders can fail. List layout omits defaultCover when cover is unset.
Prefer real listing images; use raw GitHub placeholder URL aligned with the app.

* fix(truyenss): resolve listing covers (.card sibling img, ../ URLs)

Genre/search cards put the thumbnail in col-2 beside the stretched link,
not inside the anchor. Image src uses ../user-upload/... which must be
resolved against the list page URL. Use the site no_avatar.jpg placeholder
so browse tiles load with the plugin Referer.

* fix(playground): readable novel summary + TruyenSS paragraph breaks

- Parse playground: normalize CR/LF and stray spaces; use whitespace-pre-line,
  max-w-prose, leading-7, break-words, explicit font-sans for robust wrapping
  when webfonts misbehave.
- TruyenSS: preserve <br>/<p> structure like novelfire (join with newlines)
  instead of collapsing the whole intro to one line.

* fix(proxy): avoid static zstd import so Vite starts on older Node

zstdDecompressSync is not exported from zlib on Node versions before it was
added. Importing it at load time broke vite.config (and the dev server)
with SyntaxError. Only call zstd at runtime when content-encoding is zstd
and throw a clear error if the runtime lacks support.

* fix(proxy): correct decompress error message for zstd

* Revert "fix(proxy): correct decompress error message for zstd"

This reverts commit ab5c4f0f6b0059589956693da534294a49500be0.

* Revert "fix(proxy): avoid static zstd import so Vite starts on older Node"

This reverts commit 58ddf6c6003fa3828a5a6627f77b4ea3aa3cfca4.

* fix(dev): proxy URL for https targets + disable auto-open by default

- Reconstruct target URL when the dev server path is /https://... (from
  window.fetch prefixing localhost); the old  + path form produced
  an invalid URL and broke all proxied plugin requests.
- Only open a browser when VITE_OPEN=true so missing xdg-open does not error.

* Revert "fix(dev): proxy URL for https targets + disable auto-open by default"

This reverts commit b0de564fca75e756ef11899e77038fc594f18f97.

* revert: drop out-of-scope parse-novel playground summary changes

Restore src/components/parse-novel.tsx to pre-093668b state; TruyenSS
summary parsing in the plugin is unchanged.

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
This commit is contained in:
Binh Lam
2026-05-18 14:20:59 -05:00
committed by GitHub
parent 6c10d00161
commit 76d60d0443
3 changed files with 311 additions and 0 deletions
+2
View File
@@ -245,6 +245,7 @@ import p_242 from '@plugins/ukrainian/smakolykytl';
import p_243 from '@plugins/vietnamese/LNHako';
import p_244 from '@plugins/vietnamese/lightnovelvn';
import p_245 from '@plugins/vietnamese/nettruyen';
import p_246 from '@plugins/vietnamese/truyenss';
const PLUGINS: Plugin.PluginBase[] = [
p_0,
@@ -493,5 +494,6 @@ const PLUGINS: Plugin.PluginBase[] = [
p_243,
p_244,
p_245,
p_246,
];
export default PLUGINS;