2023-06-19 23:42:47 +02:00
|
|
|
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
2017-12-12 07:16:32 +01:00
|
|
|
|
2023-08-11 04:46:45 +02:00
|
|
|
package rewrite // import "miniflux.app/v2/internal/reader/rewrite"
|
2017-12-12 07:16:32 +01:00
|
|
|
|
|
|
|
// List of predefined rewrite rules (alphabetically sorted)
|
|
|
|
// Available rules: "add_image_title", "add_youtube_video"
|
|
|
|
// domain => rule name
|
|
|
|
var predefinedRules = map[string]string{
|
|
|
|
"abstrusegoose.com": "add_image_title",
|
|
|
|
"amazingsuperpowers.com": "add_image_title",
|
2023-01-09 00:45:08 +01:00
|
|
|
"blog.cloudflare.com": `add_image_title,remove("figure.kg-image-card figure.kg-image + img")`,
|
2022-07-27 16:55:40 +02:00
|
|
|
"blog.laravel.com": "parse_markdown",
|
2017-12-12 07:16:32 +01:00
|
|
|
"cowbirdsinlove.com": "add_image_title",
|
|
|
|
"drawingboardcomic.com": "add_image_title",
|
|
|
|
"exocomics.com": "add_image_title",
|
2021-12-16 20:00:38 +01:00
|
|
|
"framatube.org": "nl2br,convert_text_link",
|
2017-12-12 07:16:32 +01:00
|
|
|
"happletea.com": "add_image_title",
|
2023-04-27 18:38:11 +02:00
|
|
|
"ilpost.it": `remove(".art_tag, #audioPlayerArticle, .author-container, .caption, .ilpostShare, .lastRecents, #mc_embed_signup, .outbrain_inread, p:has(.leggi-anche), .youtube-overlay")`,
|
2017-12-12 07:16:32 +01:00
|
|
|
"imogenquest.net": "add_image_title",
|
|
|
|
"lukesurl.com": "add_image_title",
|
2021-12-16 20:00:38 +01:00
|
|
|
"medium.com": "fix_medium_images",
|
2017-12-12 07:16:32 +01:00
|
|
|
"mercworks.net": "add_image_title",
|
2021-12-16 20:02:07 +01:00
|
|
|
"monkeyuser.com": "add_image_title",
|
2017-12-12 07:16:32 +01:00
|
|
|
"mrlovenstein.com": "add_image_title",
|
|
|
|
"nedroid.com": "add_image_title",
|
2024-04-01 19:01:48 +02:00
|
|
|
"oglaf.com": `replace("media.oglaf.com/story/tt(.+).gif"|"media.oglaf.com/comic/$1.jpg"),add_image_title`,
|
2017-12-12 07:16:32 +01:00
|
|
|
"optipess.com": "add_image_title",
|
|
|
|
"peebleslab.com": "add_image_title",
|
2022-01-03 16:47:10 +01:00
|
|
|
"quantamagazine.org": `add_youtube_video_from_id, remove("h6:not(.byline,.post__title__kicker), #comments, .next-post__content, .footer__section, figure .outer--content, script")`,
|
2017-12-12 07:16:32 +01:00
|
|
|
"sentfromthemoon.com": "add_image_title",
|
|
|
|
"thedoghousediaries.com": "add_image_title",
|
2023-04-07 21:00:42 +02:00
|
|
|
"theverge.com": `add_dynamic_image, remove("div.duet--recirculation--related-list")`,
|
2017-12-12 07:16:32 +01:00
|
|
|
"treelobsters.com": "add_image_title",
|
2023-07-11 05:26:50 +02:00
|
|
|
"webtoons.com": `add_dynamic_image,replace("webtoon"|"swebtoon")`,
|
2021-12-16 20:00:38 +01:00
|
|
|
"www.qwantz.com": "add_image_title,add_mailto_subject",
|
2022-10-19 16:51:55 +02:00
|
|
|
"www.recalbox.com": "parse_markdown",
|
2017-12-12 07:16:32 +01:00
|
|
|
"xkcd.com": "add_image_title",
|
2021-12-16 20:00:38 +01:00
|
|
|
"youtube.com": "add_youtube_video",
|
2017-12-12 07:16:32 +01:00
|
|
|
}
|