Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Commit

Permalink
add special rules
Browse files Browse the repository at this point in the history
  • Loading branch information
theowenyoung committed Nov 13, 2022
1 parent cddce9a commit 4a3bdce
Showing 1 changed file with 226 additions and 0 deletions.
226 changes: 226 additions & 0 deletions src/lib/specialRules.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
const specialRules = [
{
"hostname": [
"twitter.com",
"tweetdeck.twitter.com",
"mobile.twitter.com"
],
"selectors": [
"[data-testid=\"tweetText\"]",
".tweet-text",
".js-quoted-tweet-text"
]
},
{
"hostname": "news.ycombinator.com",
"selectors": [
".titleline >a",
".comment",
".toptext"
]
},
{
"hostname": "www.reddit.com",
"selectors": [
"h1",
"[data-click-id=body] h3",
"[data-click-id=background] h3"
],
"containerSelectors": [
"[data-testid=comment]",
"[data-adclicklocation=media]"
]
},
{
"hostname": "old.reddit.com",
"selectors": [
"a.title"
],
"containerSelectors": [
"[role=main] .md-container"
]
},
{
"regex": "finance.yahoo.com/$",
"selectors": [
"h3"
]
},
{
"regex": [
"www.bloomberg.com/[A-Za-z0-9]+$",
"www.bloomberg.com/$"
],
"selectors": [
"article h3",
"article .single-story-module__headline-link",
"article [data-tracking-type=Story]",
"article .story-list-story__info__headline"
]
},
{
"regex": "translatewebpages.org/result/.+$",
"selectors": [
"div"
],
"style": "none"
},
{
"hostname": "www.cell.com",
"selectors": [
"div.section-paragraph > div.section-paragraph > div.section-paragraph",
"section > div.section-paragraph",
"h4",
"h3",
"h2"
]
},
{
"hostname": [
"www.msdmanuals.com",
"localhost"
],
"noTranslateSelectors": [
".d-none"
]
},
{
"hostname": "www.reuters.com",
"containerSelectors": "main"
},
{
"regex": "finance.yahoo.com/news",
"containerSelectors": "[role=article]"
},
{
"hostname": "www.whatsonweibo.com",
"containerSelectors": "#mvp-post-main"
},
{
"hostname": [
"www.wsj.com",
"www.economist.com"
],
"containerSelectors": "main"
},
{
"hostname": [
"mail.jabber.org",
"antirez.com"
],
"selectors": [
"pre"
],
"containerSelectors": "pre",
"style": "none"
},
{
"hostname": "github.com",
"containerSelectors": ".markdown-body"
},
{
"hostname": "www.youtube.com",
"selectors": [
"#content-text"
]
},
{
"hostname": "www.facebook.com",
"selectors": [
"div[data-ad-comet-preview=message] > div > div",
"div[role=article] > div > div > div > div > div > div > div > div "
]
},
{
"regex": ".substack.com/",
"selectors": [
".post-preview-title",
".post-preview-description"
],
"containerSelectors": [
".post"
]
},
{
"hostname": "www.nature.com",
"containerSelectors": "article"
},
{
"hostname": "seekingalpha.com",
"containerSelectors": "div.wsb_section",
"brToParagraph": true
},
{
"hostname": "hn.algolia.com",
"selectors": [
".Story_title"
]
},
{
"hostname": "read.readwise.io",
"selectors": [
"div[class^=\"_titleRow_\"]",
"div[class^=\"_description_\"]"
],
"containerSelectors": [
"#document-text-content"
]
},
{
"hostname": "www.inoreader.com",
"selectors": [
".article_title"
],
"containerSelectors": [
".article_content"
]
},
{
"hostname": "mail.google.com",
"selectors": [
"h2[data-thread-perm-id]",
"span[data-thread-id]"
],
"containerSelectors": [
"div[data-message-id]"
],
"blockElements": [
"H1",
"H2",
"H3",
"H4",
"H5",
"H6",
"OL",
"P",
"LI"
]
},
{
"hostname": "www.producthunt.com",
"selectors": [
"a[data-test^='post-']",
"h2",
"div.layoutCompact div[class^='styles_htmlText__']"
]
},
{
"hostname": "arxiv.org",
"selectors": [
"blockquote.abstract",
"h1"
]
},
{
"hostname": "discord.com",
"selectors": [
"div[id^='message-content-']"
]
},
{
"regex": "web.telegram.org/z/",
"selectors": [
".text-content"
]
}
]

0 comments on commit 4a3bdce

Please sign in to comment.