一个可扩展的通用型小说下载器。
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
chore: 删除过时的E2E测试环境和技能文档 | 1 个月前 | |
chore: 删除过时的E2E测试环境和技能文档 | 1 个月前 | |
ncu -u | 2 年前 | |
add tools/font | 4 年前 | |
fix #884 | 4 个月前 | |
fix #865 | 4 个月前 | |
ncu -u | 2 年前 | |
update Readme | 5 年前 | |
feat(sbxh): add sbxh1.com chapter downloader (direct API + decrypt) Adds support for downloading novels from sbxh1.com (Newtoki Korean novel mirror). The site: * Has Cloudflare in front. Once the user has a cf_clearance cookie, same-origin fetch() requests pass through fine. * Renders chapter content into a closed shadow DOM via Element.prototype.attachShadow({mode:"closed"}) so the rendered text is not directly accessible from the parent page. * Has an anti-frame guard: if (window.top !== window.self) return void w("framed"); so naive iframe-based scraping cannot reach the content path at all. * Encrypts chapter payloads with an XOR cipher whose key is derived from a per-session cookie set by /api/nv-issue. Implementation replicates the site's own request flow directly from the book page, with no iframes: 1. fetch the chapter URL (same-origin, cookies included). The Server Components stream contains the per-chapter `token` and the dynamic `cookieName` prop — extracted via plain indexOf on escaped-JSON markers. 2. Ensure the cookie is present, falling back to a POST to /api/nv-issue. 3. Generate a 24-byte nonce (base64url) and compute the proof = HMAC-SHA256(cookieValue, `${token}.${nonce}.${navigator.userAgent}`) via Web Crypto. 4. POST /api/novel-content with x-novel-client: shadow-v2 to get {ok, empty, payload}. 5. XOR-decrypt payload using cookieValue.split(".")[0] as the key (also base64url). 6. The decrypted body is either {kind:"html", html, css}, or {kind:"text", text} with paragraphs separated by blank lines, or plain text. Render into a div with <p> tags (text mode) or innerHTML (html mode); content-patch strips style/script/iframe. Bundle-size work to keep the dev build under the 2 MiB performance gate: * Replace the mime-db JSON dep (~150 KiB) with a small inline src/lib/mimeDbLite.ts covering the mime types the downloader actually emits. * Externalize css-tree (~135 KiB) via webpack externals and a new @require for unpkg's IIFE build, matching the existing pattern for crypto-js/fflate/vue/etc. Other: * Split src/index.ts into a thin side-effect-free dispatcher that dynamic-imports src/bootstrap/top so the heavy module graph (fixVue's Function proxy, UI init, etc.) stays out of side-effect import order. @noframes remains true; @exclude for sbxh1 chapter URLs is preserved so the script doesn't try to render the download UI on a chapter page itself. * src/lib/pierceShadow.ts is added as a small shared shadow-piercing query helper. Not used by the current implementation but kept as a building block for future rules. * test/e2e-validate.ts gets a sbxh1 book page case (URL placeholder -- the maintainer must substitute a real book id). * docs/superpowers/specs/ and docs/superpowers/plans/ retain the design notes that led here. | 3 个月前 | |
fix(sosadfun): 优化章节解析逻辑 | 29 天前 | |
fix(alphapolis): wait for Vue-rendered TOC before building chapter list (#957) The episode list on alphapolis index pages is rendered asynchronously by Vue after page load. The previous mkRuleClass factory captured aList via document.querySelectorAll() at rule-construction time (which runs at Tampermonkey's document-end), so the NodeList was empty and bookParse produced a Book with zero chapters, surfacing as "加载章节失败!" in the UI. Convert the rule to a class extending BaseRuleClass and poll inside bookParse() until the episode anchors appear (250ms interval, 30s cap), matching the existing pattern in shuhai/qidian. Also drop the coverUrl selector: img.c-banner is an event-ad banner, not the book cover, and alphapolis index pages don't render the book's own cover image. Closes #957 | 1 个月前 | |
fix #838 | 4 个月前 | |
重写 pixiv | 3 年前 | |
fix #865 | 4 个月前 | |
add husky and pretty-quick | 3 年前 | |
init | 5 年前 | |
update .gitignore | 4 年前 | |
ncu -u | 2 年前 | |
chore: 删除过时的E2E测试环境和技能文档 | 1 个月前 | |
fix #896 | 6 个月前 | |
update | 3 年前 | |
init | 5 年前 | |
update dependncy | 4 个月前 | |
fix(dependencies): update mdui to version 2.1.5 in header.json and ssri-lock.json | 1 个月前 | |
fix sites.ts update third-party-license.txt | 3 年前 | |
ncu -u | 2 年前 | |
全面切换至esm | 3 年前 | |
feat(sbxh): add sbxh1.com chapter downloader (direct API + decrypt) Adds support for downloading novels from sbxh1.com (Newtoki Korean novel mirror). The site: * Has Cloudflare in front. Once the user has a cf_clearance cookie, same-origin fetch() requests pass through fine. * Renders chapter content into a closed shadow DOM via Element.prototype.attachShadow({mode:"closed"}) so the rendered text is not directly accessible from the parent page. * Has an anti-frame guard: if (window.top !== window.self) return void w("framed"); so naive iframe-based scraping cannot reach the content path at all. * Encrypts chapter payloads with an XOR cipher whose key is derived from a per-session cookie set by /api/nv-issue. Implementation replicates the site's own request flow directly from the book page, with no iframes: 1. fetch the chapter URL (same-origin, cookies included). The Server Components stream contains the per-chapter `token` and the dynamic `cookieName` prop — extracted via plain indexOf on escaped-JSON markers. 2. Ensure the cookie is present, falling back to a POST to /api/nv-issue. 3. Generate a 24-byte nonce (base64url) and compute the proof = HMAC-SHA256(cookieValue, `${token}.${nonce}.${navigator.userAgent}`) via Web Crypto. 4. POST /api/novel-content with x-novel-client: shadow-v2 to get {ok, empty, payload}. 5. XOR-decrypt payload using cookieValue.split(".")[0] as the key (also base64url). 6. The decrypted body is either {kind:"html", html, css}, or {kind:"text", text} with paragraphs separated by blank lines, or plain text. Render into a div with <p> tags (text mode) or innerHTML (html mode); content-patch strips style/script/iframe. Bundle-size work to keep the dev build under the 2 MiB performance gate: * Replace the mime-db JSON dep (~150 KiB) with a small inline src/lib/mimeDbLite.ts covering the mime types the downloader actually emits. * Externalize css-tree (~135 KiB) via webpack externals and a new @require for unpkg's IIFE build, matching the existing pattern for crypto-js/fflate/vue/etc. Other: * Split src/index.ts into a thin side-effect-free dispatcher that dynamic-imports src/bootstrap/top so the heavy module graph (fixVue's Function proxy, UI init, etc.) stays out of side-effect import order. @noframes remains true; @exclude for sbxh1 chapter URLs is preserved so the script doesn't try to render the download UI on a chapter page itself. * src/lib/pierceShadow.ts is added as a small shared shadow-piercing query helper. Not used by the current implementation but kept as a building block for future rules. * test/e2e-validate.ts gets a sbxh1 book page case (URL placeholder -- the maintainer must substitute a real book id). * docs/superpowers/specs/ and docs/superpowers/plans/ retain the design notes that led here. | 3 个月前 | |
update dependncy | 4 个月前 |
项目 README 为空