miniflux/reader/rewrite
Jouni K. Seppänen bb0d2bf675 Add Youtube videos in Quanta articles
Some articles (especially the recent year-in-review ones) include a Youtube
video. The server-side rendered articles do not include the Youtube iframe,
but they do have a script that looks like

    <script type="text/javascript" data-reactid="6">
      window.__APOLLO_STATE__ = {
        ...
          youtube_id: "9uASADiYe_8",

We add a reformatting function that tries to detect obvious JavaScript code
that has a field or variable called youtube_id that has an 11-character
double-quoted value, and adds the referenced Youtube videos in the beginning of
the article. This is slightly more general than needed for Quanta, in the hope
that it could be useful for similar sites.
2022-01-03 10:10:13 -08:00
..
doc.go Add missing package descriptions for GoDoc 2018-10-08 17:32:17 -07:00
rewrite_functions.go Add Youtube videos in Quanta articles 2022-01-03 10:10:13 -08:00
rewriter.go Add Youtube videos in Quanta articles 2022-01-03 10:10:13 -08:00
rewriter_test.go Add data-srcset support to "add_dynamic_image rewrite" rewrite rule 2021-10-22 18:12:23 -07:00
rules.go Add Youtube videos in Quanta articles 2022-01-03 10:10:13 -08:00