Add Public.fr

This commit is contained in:
magnolia1234 2022-11-10 08:44:10 +01:00
parent 4b7b0a16f7
commit 9e2e5f3b51
8 changed files with 37 additions and 10 deletions

View file

@ -457,6 +457,7 @@ Grouped in options:\
[Mediapart (fr/en/es)](https://www.mediapart.fr) -
[Paris Match](https://www.parismatch.com) -
[Philonomist (fr/en)](https://www.philonomist.com) -
[Public](https://www.public.fr) -
[Science & Vie](https://www.science-et-vie.com) -
[Sciences et Avenir](https://www.sciencesetavenir.fr) -
[Télérama](https://www.telerama.fr) -

View file

@ -3,9 +3,10 @@ Changelog Bypass Paywalls Clean - Firefox
Post-release
Add Ad.nl (+ regional) & Hln.be
Add Public.fr
Add Record.pt
Add The New York Post
Remove Dn.no
Remove Dn.no (fix obsolete)
Fix Cmjornal.pt
Fix Koelner Stadt-Anzeiger & Koelnische Rundschau
Fix NHST Media Group

View file

@ -1337,11 +1337,12 @@ else if (matchDomain('lavie.fr')) {
overlay.removeAttribute('style');
}
else if (matchDomain(['lejdd.fr', 'parismatch.com'])) {
else if (matchDomain(['lejdd.fr', 'parismatch.com', 'public.fr'])) {
let poool_banner = document.querySelector('#poool-container');
let poool_widget = document.querySelector('#poool-widget-content');
let forbidden = document.querySelector('.forbidden');
let ads = document.querySelectorAll('div[class^="lmn-"]');
removeDOMElement(poool_banner, forbidden, ...ads);
removeDOMElement(poool_banner, poool_widget, forbidden, ...ads);
let bottom_hide = document.querySelector('.cnt[data-poool-mode="hide"]');
if (bottom_hide) {
bottom_hide.removeAttribute('data-poool-mode');
@ -3965,7 +3966,7 @@ else if (matchDomain(no_nhst_media_domains)) {
} else {
window.setTimeout(function () {
let paywall = document.querySelector('iframe#paywall-iframe');
if (paywall) {
if (paywall && dompurify_loaded) {
let intro = document.querySelector('div.global-article-selector');
let article = paywall.parentNode;
removeDOMElement(paywall, intro);
@ -3980,7 +3981,7 @@ else if (matchDomain(no_nhst_media_domains)) {
if (json) {
let json_text = json.article.body;
let parser = new DOMParser();
let doc = parser.parseFromString('<div>' + json_text + '</div>', 'text/html');
let doc = parser.parseFromString('<div>' + DOMPurify.sanitize(json_text, {ADD_ATTR: ['itemprop'], ADD_TAGS: ['link']}) + '</div>', 'text/html');
let article_new = doc.querySelector('div');
if (article_new) {
if (article)

View file

@ -500,6 +500,7 @@
"*://*.precisiononcologynews.com/*",
"*://*.prevention.com/*",
"*://*.prospectmagazine.co.uk/*",
"*://*.public.fr/*",
"*://*.puck.news/*",
"*://*.pzc.nl/*",
"*://*.quora.com/*",
@ -729,5 +730,5 @@
"*://gcm.omerlocdn.com/*",
"*://webcache.googleusercontent.com/*"
],
"version": "2.9.2.6"
"version": "2.9.2.7"
}

View file

@ -14,8 +14,8 @@
}
</style>
</head>
<body>
<div style="width:275px"><strong>Bypass Paywalls Clean <span id="version"></span></strong><span id="site_switch_span">&nbsp;&nbsp;</span></div>
<body style="width:275px">
<div><strong>Bypass Paywalls Clean <span id="version"></span></strong><span id="site_switch_span">&nbsp;&nbsp;</span></div>
<div><a href="options.html" target="_blank">Options</a> |
<a href="options_custom.html" target="_blank">Custom</a> |
<a href="https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean" target="_blank">Help</a> |

View file

@ -18,14 +18,18 @@ function show_update(ext_version_new, check = true) {
ext_version_new: ext_version_new
});
anchorEl = document.createElement('a');
anchorEl.innerText = 'New release v' + ext_version_new;
if (manifestData.applications && manifestData.applications.gecko.id.includes('magnolia')) {
if (installType === 'development')
anchorEl.href = 'https://gitlab.com/magnolia1234/bypass-paywalls-' + url_loc + '-clean';
else
else {
anchorEl.href = 'https://gitlab.com/magnolia1234/bypass-paywalls-' + url_loc + '-clean/-/releases';
ext_version_new = ext_version_new.replace(/\d$/, '0');
}
} else
anchorEl.href = 'https://addons.mozilla.org/en-US/firefox/addon/bypass-paywalls-clean';
if (installType !== 'development')
ext_version_new = ext_version_new.replace(/\d$/, '0');
anchorEl.innerText = 'New release v' + ext_version_new;
anchorEl.target = '_blank';
versionString_new.appendChild(anchorEl);
if (!manifestData.name.includes('Clean')) {

View file

@ -1522,6 +1522,11 @@ var defaultSites = {
domain: "prospectmagazine.co.uk",
allow_cookies: 1
},
"Public.fr": {
domain: "public.fr",
allow_cookies: 1,
block_regex: /\.poool\.fr\//
},
"Puck.news": {
domain: "puck.news",
allow_cookies: 1

View file

@ -11,6 +11,20 @@
"ld_google_webcache": "div[id^=\"paywall_\"], div.offre-basique|div.paywall-restricted-content, div.content-article",
"new_site": 1
},
"Public.fr": {
"domain": "public.fr",
"allow_cookies": 1,
"block_regex": "\\.poool\\.fr\\/",
"cs_code": [{
"cond": "#poool-widget-content",
"rm_elem": 1
}, {
"cond": ".cnt[data-poool-mode=\"hide\"]",
"rm_attrib": "data-poool-mode"
}
],
"new_site": 1
},
"Record.pt": {
"domain": "record.pt",
"allow_cookies": 1,