Conversation
Crimson Scrolls moved to a new theme: the admin-ajax listing/search actions and the cs/v1 chapter API are gone, and chapters now live under /novel/<novel>/<chapter>/. Browse and search use the /novels/ page, chapters come from the crimsonscrolls/v2 novel-chapters endpoint across all access tiers, and locked chapters raise a clear error. Adds sort, status and genre filters.
|
| !isNovel && !path.includes('/') | ||
| ? `${this.site}/chapter/${path}/` | ||
| : `${this.site}/${path}`; |
There was a problem hiding this comment.
When a novel uses defaultCover, resolveUrl adds the Crimson Scrolls address to a URL that is already complete. EPUB export cannot fetch that address, so the file has no cover image. Leave complete URLs unchanged.
| !isNovel && !path.includes('/') | |
| ? `${this.site}/chapter/${path}/` | |
| : `${this.site}/${path}`; | |
| path.startsWith('http://') || path.startsWith('https://') | |
| ? path | |
| : !isNovel && !path.includes('/') | |
| ? `${this.site}/chapter/${path}/` | |
| : `${this.site}/${path}`; |
There was a problem hiding this comment.
Fixed in 4b2d7a1: resolveUrl now returns http(s):// URLs unchanged (so defaultCover is no longer prefixed) and turns protocol-relative // URLs into https:. Bare legacy chapter slugs still go to /chapter/<slug>/, and novel/... paths still get the site prefix. I checked all four cases on the bundled plugin and re-ran the live check, which passes.
Return http(s) URLs unchanged and give protocol-relative URLs https, so defaultCover and other complete URLs are not prefixed with the site.
Closes #2423
What was wrong
The Crimson Scrolls plugin (
plugins/english/crimsonscrolls.ts, v1.0.1) was already in the repo, but it stopped working after the site moved to a new theme (crimsonscrolls-v2).npm run check:pluginfailed on the first call:popularNovels→cheerio.load() expects a string.admin-ajax.phpactionsload_novelsandlive_novel_searchno longer return HTML, so browse and search broke.wp-json/cs/v1/novels/{id}/chaptersAPI is gone, and so are#single-novel-content-wrapper,#chapter-listand#chapter-display./novel/<novel-slug>/<chapter-slug>/. The old/chapter/<slug>/URLs 301-redirect there.What changed (1.0.1 → 1.1.0)
/novels/?cs_page=N, and search uses?s=on the same page. Search is now paginated.wp-json/crimsonscrolls/v2/novel-chaptersfor every access tier the novel lists (free,tier_1…tier_4), 100 per page. Paid-tier chapters get the 🔒 prefix. The existing "Hide locked chapters" setting skips the paid tiers entirely.article.cs-reader. The plugin removes ads, scripts, the duplicated title header and the hidden per-paragraph copy watermarks. It also strips anyon*attributes andjavascript:URLs. A locked chapter (tier gate) now raises a clear error instead of returning the paywall markup.novel/<slug>/). New chapter paths are the fullnovel/<slug>/<chapter>/. Chapters saved by 1.0.1 used the bare chapter slug, soresolveUrlsends those to/chapter/<slug>/, which the site redirects. As a result, previously downloaded chapter entries still open. Once a library novel is refreshed, though, its chapters will appear under the new paths. Completehttp(s)://URLs, such asdefaultCover, pass throughresolveUrlunchanged, and protocol-relative//URLs gethttps:.Testing
All testing was run by an AI agent against the live site. There has been no human review or in-app testing yet.
npm run check:plugin -- plugins/english/crimsonscrolls.tspassed: popularNovels 18 novels, searchNovels 1 result, parseNovel 333 chapters, parseChapter ~11k chars.on*attributes,javascript:URLs, scripts or ad markup.resolveUrlchecked on the bundled plugin with a full URL, a protocol-relative URL, a legacy bare chapter slug, anovel/<slug>/<chapter>/path and a novel path.npx eslint,prettier --check,tsc --noEmitandnpm run build:compileall pass./chapter/<slug>/(the legacy redirect) when the request has a barenode/curlUser-Agent. With a browser User-Agent it returns 301 as expected. So the legacy-path fallback is verified only with a browser UA, not through the Node checker. The/novel/...chapter URLs work with every UA I tried.🤖 Authored by an AI agent (Claude Code, Claude Opus 5.5). Please weight review accordingly.