Add ilManifesto.it

This commit is contained in:
magnolia1234 2022-06-06 09:42:53 +02:00
parent de8a8f11f9
commit b991c6d94c
6 changed files with 40 additions and 2 deletions

View File

@ -525,6 +525,7 @@ Grouped in options:\
[Huffingtonpost.it](https://www.huffingtonpost.it) -
[Il Fatto Quotidiano](https://www.ilfattoquotidiano.it) -
[Il Foglio](https://www.ilfoglio.it) -
[Il Manifesto](https://ilmanifesto.it) -
[Il Secolo XIX](https://www.ilsecoloxix.it) -
[Internazionale](https://www.internazionale.it) -
[Italia Oggi](https://www.italiaoggi.it) -

View File

@ -6,7 +6,7 @@ var ext_name = manifestData.name;
var ext_version = manifestData.version;
const cs_limit_except = ['elespanol.com', 'faz.net', 'nation.africa', 'nationalgeographic.com', 'thetimes.co.uk'];
const dompurify_sites = ['asiatimes.com', 'bloomberg.com', 'cicero.de', 'economictimes.com', 'hs.fi', 'iltalehti.fi', 'ipolitics.ca', 'italiaoggi.it', 'lesechos.fr', 'marianne.net', 'newleftreview.org', 'nzherald.co.nz', 'prospectmagazine.co.uk', 'stratfor.com', 'techinasia.com', 'timesofindia.com', 'valor.globo.com', 'vn.nl'].concat(be_mediahuis_domains, fr_groupe_sud_ouest_domains, nl_mediahuis_region_domains, no_nhst_media_domains, usa_theathletic_domains);
const dompurify_sites = ['asiatimes.com', 'bloomberg.com', 'cicero.de', 'economictimes.com', 'hs.fi', 'ilmanifesto.it', 'iltalehti.fi', 'ipolitics.ca', 'italiaoggi.it', 'lesechos.fr', 'marianne.net', 'newleftreview.org', 'nzherald.co.nz', 'prospectmagazine.co.uk', 'stratfor.com', 'techinasia.com', 'timesofindia.com', 'valor.globo.com', 'vn.nl'].concat(be_mediahuis_domains, fr_groupe_sud_ouest_domains, nl_mediahuis_region_domains, no_nhst_media_domains, usa_theathletic_domains);
var currentTabUrl = '';
var csDone = false;
var optin_setcookie = false;

View File

@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Firefox
Post-release
Add Estado de Minas (Brazil)
Add ilManifesto.it
Add The Irish Times
Remove Handelsblatt
Remove Study.com (fix obsolete)

View File

@ -1622,6 +1622,37 @@ else if (matchDomain('ilfoglio.it')) {
}
}
else if (matchDomain('ilmanifesto.it')) {
if (window.location.pathname.match(/((\w)+(\-)+){3,}/)) {
let paywall = document.querySelector('div[class^="PostPaywall_PostPaywall__"]');
if (paywall) {
removeDOMElement(paywall);
let json_script = document.querySelector('script#__NEXT_DATA__');
if (json_script && dompurify_loaded) {
let json = JSON.parse(json_script.innerText);
if (json && json.props.pageProps.content && json.props.pageProps.content.content) {
let article_new = json.props.pageProps.content.content;
let article = document.querySelector('div.ArticleBody');
if (article) {
article.innerHTML = '';
let parser = new DOMParser();
let doc = parser.parseFromString('<div>' + DOMPurify.sanitize(article_new) + '</div>', 'text/html');
let content_new = doc.querySelector('div');
article.appendChild(content_new);
}
} else
window.location.reload(true);
}
}
}
let service_page = document.querySelector('div.service-page');
if (service_page) {
window.setTimeout(function () {
window.location.reload(true);
}, 1000);
}
}
else if (matchDomain(it_ilmessaggero_domains)) {
if (window.location.pathname.toLowerCase().includes('/amp/')) {
amp_unhide_subscr_section('amp-ad, amp-embed');

View File

@ -276,6 +276,7 @@
"*://*.ilgazzettino.it/*",
"*://*.ilgiorno.it/*",
"*://*.illawarramercury.com.au/*",
"*://*.ilmanifesto.it/*",
"*://*.ilmattino.it/*",
"*://*.ilmessaggero.it/*",
"*://*.ilrestodelcarlino.it/*",
@ -682,5 +683,5 @@
"*://*.wsj.net/*",
"*://webcache.googleusercontent.com/*"
],
"version": "2.7.1.3"
"version": "2.7.1.4"
}

View File

@ -789,6 +789,10 @@ var defaultSites = {
allow_cookies: 1,
block_regex: /cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js/
},
"Il Manifesto": {
domain: "ilmanifesto.it",
allow_cookies: 1
},
"Il Messaggero (+ regional)": {
domain: "###_it_ilmessaggero",
group: [