fix(multisrc): fix FreeWebNovel cover images failing to load (#2577) - #2626
Conversation
…ink protection - Add imageRequestInit with site Referer header to bypass Cloudflare image hotlink blocks in app image loader - Support data-cfsrc and data-original attributes in parseNovels and parseNovel to extract actual covers instead of data URI placeholders - Bump versionIncrements for FWN.com to 5 Closes lnreader#2577
|
| const cover = | ||
| attribs.src ?? attribs['data-cfsrc'] ?? attribs['data-src']; | ||
| attribs['data-src'] || | ||
| attribs['data-cfsrc'] || | ||
| attribs['data-original'] || | ||
| attribs.src; | ||
| const name = attribs.title; | ||
| if (cover) { | ||
| if (cover && !cover.startsWith('data:')) { | ||
| novel.cover = new URL(cover, this.site).href; |
There was a problem hiding this comment.
| "chapterListing": "api/chapterlist.php", | ||
| "chapterParam": "aid", | ||
| "versionIncrements": 4, | ||
| "versionIncrements": 5, |
There was a problem hiding this comment.
Other sources keep old versions
The shared template changes the generated code for all eight sources, but only FWN.com gets a new version. If the app uses that version to offer updates, users with the other seven sources will not be offered the changed plugin. Bump those versions too, or limit the shared change to FWN.com.
…scoped referer header
Closes #2577
Refererheader toimageRequestInitinreadnovelfullmultisrc template to unblock hotlink protectiondata-cfsrcanddata-originalimage attributes and filter out inlinedata:base64 placeholdersChecklist