diff --git a/README.md b/README.md index c91c816..14c73f1 100644 --- a/README.md +++ b/README.md @@ -158,7 +158,7 @@ Grouped in options:\ [Commentary Magazine](https://www.commentary.org) - [ESPN USA](https://www.espn.com) - [First Things](https://www.firstthings.com) - -[Medium](https://www.medium.com/topics) (for custom domains enable custom sites) - +[Medium](https://www.medium.com/topics)* (for custom domains enable custom sites) - [National Review](https://www.nationalreview.com) - [Rolling Stone](https://www.rollingstone.com) - [RugbyPass](https://www.rugbypass.com) - @@ -515,6 +515,7 @@ Grouped in options:\ [Il Foglio](https://www.ilfoglio.it) - [Il Secolo XIX](https://www.ilsecoloxix.it) - [Internazionale](https://www.internazionale.it) - +[Italia Oggi](https://www.italiaoggi.it) - [Italian.tech](https://www.italian.tech) - [La Nuova Sardegna](https://www.lanuovasardegna.it) - [La Repubblica](https://www.repubblica.it) - diff --git a/background.js b/background.js index 2807316..b1ef225 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', 'lesechos.fr', 'marianne.net', 'newleftreview.org', 'nzherald.co.nz', 'prospectmagazine.co.uk', 'stratfor.com', 'techinasia.com', 'timesofindia.com', 'valor.globo.com', 'vn.nl'].concat(au_comm_media_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', '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(au_comm_media_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 73f39b0..af43d96 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,12 +3,9 @@ Changelog Bypass Paywalls Clean - Firefox Post-release Add Automobilwoche -Add Better Nutrition +Add Better Nutrition, Gym Climber, Peloton, Podium Runner & Rock and Ice Add eNotes -Add Gym Climber -Add Peloton -Add Podium Runner -Add Rock and Ice +Add Italia Oggi Remove ilManifesto.it (fix obsolete) Fix El Pais (amp/video) Fix Fortune (magazine) diff --git a/contentScript.js b/contentScript.js index c6de993..7a76d95 100644 --- a/contentScript.js +++ b/contentScript.js @@ -1686,6 +1686,35 @@ else if (matchDomain(it_quotidiano_domains)) { } } +else if (matchDomain('italiaoggi.it')) { + let paywall = document.querySelector('div.boxAbb'); + if (paywall && dompurify_loaded) { + let overlay = document.querySelector('div.article-locked-overlay'); + removeDOMElement(paywall, overlay); + let article_locked = document.querySelector('div.article-locked'); + if (article_locked) { + article_locked.classList.remove('article-locked'); + let json_script = getArticleJsonScript(); + if (json_script) { + let json = JSON.parse(json_script.text); + if (json) { + let json_text = json.articleBody; + let content = article_locked.querySelector('section'); + if (json_text && content) { + if (json_text && content) { + let parser = new DOMParser(); + json_text = DOMPurify.sanitize(json_text).replace(/'/g, "'").replace(/;/g, ''); + let doc = parser.parseFromString('
' + json_text + '
', 'text/html'); + let content_new = doc.querySelector('div'); + content.parentNode.replaceChild(content_new, content); + } + } + } + } + } + } +} + else if (matchDomain('lescienze.it')) { window.setTimeout(function () { let paywall = document.querySelector('.paywall-adagio'); diff --git a/manifest.json b/manifest.json index 8f541c7..c63a411 100644 --- a/manifest.json +++ b/manifest.json @@ -297,6 +297,7 @@ "*://*.investorschronicle.co.uk/*", "*://*.ipolitics.ca/*", "*://*.italian.tech/*", + "*://*.italiaoggi.it/*", "*://*.japantimes.co.jp/*", "*://*.journaldunet.com/*", "*://*.journalnow.com/*", @@ -672,5 +673,5 @@ "*://*.wsj.net/*", "*://webcache.googleusercontent.com/*" ], - "version": "2.6.5.5" + "version": "2.6.5.6" } diff --git a/sites.js b/sites.js index 3cf0b2b..6a65657 100644 --- a/sites.js +++ b/sites.js @@ -842,6 +842,10 @@ var defaultSites = { allow_cookies: 1, block_regex: /(cdn\.flip-pay\.com\/clients\/inm\/flip-pay\.js)/ }, + "Italia Oggi": { + domain: "italiaoggi.it", + allow_cookies: 1 + }, "Italian.tech": { domain: "italian.tech", group_rule: "###_gr_it_repubblica_domains" @@ -1136,13 +1140,13 @@ var defaultSites = { allow_cookies: 1, block_regex: /(\.blueconic\.net\/|\.tinypass\.com\/|\.com\/.+\/loader\.min\.js|cdn\.ampproject\.org\/v\d\/amp-((sticky-)?ad|subscriptions)-.+\.js)/ }, - "Medium": { + "Medium (free articles only)": { domain: "medium.com", allow_cookies: 1, remove_cookies: 1, referer: "twitter" }, - "Medium custom domains": { + "Medium custom domains (free articles only; opt-in to custom sites)": { domain: "###_medium_custom" }, "Mexico News Daily": { diff --git a/sites_updated.json b/sites_updated.json index 617cb9d..089ba2d 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -52,6 +52,12 @@ "domain": "investorschronicle.co.uk", "referer": "google" }, + "Italia Oggi": { + "domain": "italiaoggi.it", + "allow_cookies": 1, + "ld_json": "div.boxAbb|div.article-locked", + "new_site": 1 + }, "Outlook India": { "domain": "outlookindia.com", "allow_cookies": 1,