mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Add support for Invidious
- Embed Invidious player for invidio.us feeds - Add new rewrite rule to use Invidious player for Youtube feeds
This commit is contained in:
parent
e494d6e381
commit
592151bdb6
4 changed files with 27 additions and 1 deletions
|
@ -33,6 +33,10 @@ func Rewriter(entryURL, entryContent, customRewriteRules string) string {
|
|||
entryContent = addDynamicImage(entryURL, entryContent)
|
||||
case "add_youtube_video":
|
||||
entryContent = addYoutubeVideo(entryURL, entryContent)
|
||||
case "add_invidious_video":
|
||||
entryContent = addInvidiousVideo(entryURL, entryContent)
|
||||
case "add_youtube_video_using_invidious_player":
|
||||
entryContent = addYoutubeVideoUsingInvidiousPlayer(entryURL, entryContent)
|
||||
case "add_pdf_download_link":
|
||||
entryContent = addPDFLink(entryURL, entryContent)
|
||||
case "nl2br":
|
||||
|
@ -47,7 +51,6 @@ func Rewriter(entryURL, entryContent, customRewriteRules string) string {
|
|||
|
||||
func getPredefinedRewriteRules(entryURL string) string {
|
||||
urlDomain := url.Domain(entryURL)
|
||||
|
||||
for domain, rules := range predefinedRules {
|
||||
if strings.Contains(urlDomain, domain) {
|
||||
return rules
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue