1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-26 18:21:01 +00:00

New add_dynamic_image rewriter for JavaScript-loaded images.

Searches tags for various `data-*` attributes and sets `img` tag `src` attribute appropriately. Falls back to searching `noscript` for `img` tags.

Includes unit tests.
This commit is contained in:
dzaikos 2018-07-09 01:22:48 -04:00
parent 8ee4280461
commit 6d25e02cb5
3 changed files with 107 additions and 0 deletions

View file

@ -24,6 +24,8 @@ func Rewriter(entryURL, entryContent, customRewriteRules string) string {
switch strings.TrimSpace(rule) {
case "add_image_title":
entryContent = addImageTitle(entryURL, entryContent)
case "add_dynamic_image":
entryContent = addDynamicImage(entryURL, entryContent)
case "add_youtube_video":
entryContent = addYoutubeVideo(entryURL, entryContent)
case "add_pdf_download_link":