Manhwa.ReaderHTML (manhwa v0.1.1)

Copy Markdown View Source

View module for the strip reader page, plus the source-building helpers shared with the template's inline engine.

Summary

Functions

Strip reader-internal URL fragments (e.g. #scrambled_N) before proxying.

Same-origin proxied URL for an external image. Synthetic images (data: URLs) pass through untouched.

Series key for client-side storage namespacing (source:slug or the slug).

Last series segment — the slug used in per-series localStorage keys.

Build a FrescoStrip.viewer :sources list. Each entry is %{url:, width:, height:} where width/height are in source pixels — the component uses them to set aspect-ratio on each <img> so the layout doesn't collapse when memory-windowing evicts off-screen srcs.

Join a URL base with one path segment, encoding the segment.

Functions

clean_image_url(url)

Strip reader-internal URL fragments (e.g. #scrambled_N) before proxying.

proxied_url(url, proxy_url)

Same-origin proxied URL for an external image. Synthetic images (data: URLs) pass through untouched.

series_key(series)

Series key for client-side storage namespacing (source:slug or the slug).

series_slug(series)

Last series segment — the slug used in per-series localStorage keys.

strip(assigns)

strip_sources(images, proxy_url)

Build a FrescoStrip.viewer :sources list. Each entry is %{url:, width:, height:} where width/height are in source pixels — the component uses them to set aspect-ratio on each <img> so the layout doesn't collapse when memory-windowing evicts off-screen srcs.

Falls back to a 720×1080 placeholder (1:1.5 portrait) when an image lacks natural dimensions.

url_join(base, segment)

Join a URL base with one path segment, encoding the segment.