diff --git a/README.md b/README.md index 4e08637a..1750f357 100644 --- a/README.md +++ b/README.md @@ -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) - diff --git a/background.js b/background.js index a7bb9004..fc5faad5 100644 --- a/background.js +++ b/background.js @@ -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; diff --git a/changelog.txt b/changelog.txt index 5bc6cf28..f6ecd97f 100644 --- a/changelog.txt +++ b/changelog.txt @@ -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) diff --git a/contentScript.js b/contentScript.js index b3585362..d3bb27fe 100644 --- a/contentScript.js +++ b/contentScript.js @@ -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('
' + DOMPurify.sanitize(article_new) + '
', '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'); diff --git a/manifest.json b/manifest.json index 491d0298..e9b8e917 100644 --- a/manifest.json +++ b/manifest.json @@ -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" } diff --git a/sites.js b/sites.js index f20766a7..1be18a7e 100644 --- a/sites.js +++ b/sites.js @@ -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: [