Skip to content

Commit 9a0320c

Browse files
authored
Merge pull request #4 from ndom91/ndom91/add-fr-lemonde
feat: add `lemonde.fr` ruleset
2 parents 347f3ce + f16e526 commit 9a0320c

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

rulesets/fr/lemonde.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
- domains:
2+
- www.lemonde.fr
3+
headers:
4+
user-agent: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
5+
referer: https://www.google.com/
6+
content-security-policy: "default-src * 'unsafe-inline' 'unsafe-eval' data: blob:;"
7+
injections:
8+
- position: head
9+
append: |
10+
<script>
11+
window.localStorage.clear();
12+
document.addEventListener("DOMContentLoaded", () => {
13+
const banners = document.querySelectorAll('section.paywall');
14+
banners.forEach(el => { el.remove(); });
15+
const contentWrapper = document.querySelectorAll('section.article__content--restricted-media');
16+
if (contentWrapper?.[0]) {
17+
contentWrapper[0].style.height = '100%'
18+
}
19+
});
20+
</script>

rulesets/us/nytimes-com.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
- www.nytimes.com
33
- www.time.com
44
headers:
5-
ueser-agent: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
5+
user-agent: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
66
cookie: nyt-a=; nyt-gdpr=0; nyt-geo=DE; nyt-privacy=1
77
referer: https://www.google.com/
88
content-security-policy: "default-src * 'unsafe-inline' 'unsafe-eval' data: blob:;"
@@ -18,4 +18,4 @@
1818
</script>
1919
tests:
2020
- url: https://www.nytimes.com/2023/11/24/business/retail-workers-black-friday-shopping.html
21-
test: document.querySelector('div[data-testid="inline-message"]') === null
21+
test: document.querySelector('div[data-testid="inline-message"]') === null

0 commit comments

Comments
 (0)