Add Italia Oggi

This commit is contained in:
magnolia1234 2022-04-23 09:43:03 +02:00
parent 5a14baded1
commit ac9b24d973
7 changed files with 48 additions and 10 deletions

View file

@ -158,7 +158,7 @@ Grouped in options:\
[Commentary Magazine](https://www.commentary.org) - [Commentary Magazine](https://www.commentary.org) -
[ESPN USA](https://www.espn.com) - [ESPN USA](https://www.espn.com) -
[First Things](https://www.firstthings.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) - [National Review](https://www.nationalreview.com) -
[Rolling Stone](https://www.rollingstone.com) - [Rolling Stone](https://www.rollingstone.com) -
[RugbyPass](https://www.rugbypass.com) - [RugbyPass](https://www.rugbypass.com) -
@ -515,6 +515,7 @@ Grouped in options:\
[Il Foglio](https://www.ilfoglio.it) - [Il Foglio](https://www.ilfoglio.it) -
[Il Secolo XIX](https://www.ilsecoloxix.it) - [Il Secolo XIX](https://www.ilsecoloxix.it) -
[Internazionale](https://www.internazionale.it) - [Internazionale](https://www.internazionale.it) -
[Italia Oggi](https://www.italiaoggi.it) -
[Italian.tech](https://www.italian.tech) - [Italian.tech](https://www.italian.tech) -
[La Nuova Sardegna](https://www.lanuovasardegna.it) - [La Nuova Sardegna](https://www.lanuovasardegna.it) -
[La Repubblica](https://www.repubblica.it) - [La Repubblica](https://www.repubblica.it) -

View file

@ -6,7 +6,7 @@ var ext_name = manifestData.name;
var ext_version = manifestData.version; var ext_version = manifestData.version;
const cs_limit_except = ['elespanol.com', 'faz.net', 'nation.africa', 'nationalgeographic.com', 'thetimes.co.uk']; 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 currentTabUrl = '';
var csDone = false; var csDone = false;
var optin_setcookie = false; var optin_setcookie = false;

View file

@ -3,12 +3,9 @@ Changelog Bypass Paywalls Clean - Firefox
Post-release Post-release
Add Automobilwoche Add Automobilwoche
Add Better Nutrition Add Better Nutrition, Gym Climber, Peloton, Podium Runner & Rock and Ice
Add eNotes Add eNotes
Add Gym Climber Add Italia Oggi
Add Peloton
Add Podium Runner
Add Rock and Ice
Remove ilManifesto.it (fix obsolete) Remove ilManifesto.it (fix obsolete)
Fix El Pais (amp/video) Fix El Pais (amp/video)
Fix Fortune (magazine) Fix Fortune (magazine)

View file

@ -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('<div><section>' + json_text + '</section></div>', 'text/html');
let content_new = doc.querySelector('div');
content.parentNode.replaceChild(content_new, content);
}
}
}
}
}
}
}
else if (matchDomain('lescienze.it')) { else if (matchDomain('lescienze.it')) {
window.setTimeout(function () { window.setTimeout(function () {
let paywall = document.querySelector('.paywall-adagio'); let paywall = document.querySelector('.paywall-adagio');

View file

@ -297,6 +297,7 @@
"*://*.investorschronicle.co.uk/*", "*://*.investorschronicle.co.uk/*",
"*://*.ipolitics.ca/*", "*://*.ipolitics.ca/*",
"*://*.italian.tech/*", "*://*.italian.tech/*",
"*://*.italiaoggi.it/*",
"*://*.japantimes.co.jp/*", "*://*.japantimes.co.jp/*",
"*://*.journaldunet.com/*", "*://*.journaldunet.com/*",
"*://*.journalnow.com/*", "*://*.journalnow.com/*",
@ -672,5 +673,5 @@
"*://*.wsj.net/*", "*://*.wsj.net/*",
"*://webcache.googleusercontent.com/*" "*://webcache.googleusercontent.com/*"
], ],
"version": "2.6.5.5" "version": "2.6.5.6"
} }

View file

@ -842,6 +842,10 @@ var defaultSites = {
allow_cookies: 1, allow_cookies: 1,
block_regex: /(cdn\.flip-pay\.com\/clients\/inm\/flip-pay\.js)/ block_regex: /(cdn\.flip-pay\.com\/clients\/inm\/flip-pay\.js)/
}, },
"Italia Oggi": {
domain: "italiaoggi.it",
allow_cookies: 1
},
"Italian.tech": { "Italian.tech": {
domain: "italian.tech", domain: "italian.tech",
group_rule: "###_gr_it_repubblica_domains" group_rule: "###_gr_it_repubblica_domains"
@ -1136,13 +1140,13 @@ var defaultSites = {
allow_cookies: 1, allow_cookies: 1,
block_regex: /(\.blueconic\.net\/|\.tinypass\.com\/|\.com\/.+\/loader\.min\.js|cdn\.ampproject\.org\/v\d\/amp-((sticky-)?ad|subscriptions)-.+\.js)/ 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", domain: "medium.com",
allow_cookies: 1, allow_cookies: 1,
remove_cookies: 1, remove_cookies: 1,
referer: "twitter" referer: "twitter"
}, },
"Medium custom domains": { "Medium custom domains (free articles only; opt-in to custom sites)": {
domain: "###_medium_custom" domain: "###_medium_custom"
}, },
"Mexico News Daily": { "Mexico News Daily": {

View file

@ -52,6 +52,12 @@
"domain": "investorschronicle.co.uk", "domain": "investorschronicle.co.uk",
"referer": "google" "referer": "google"
}, },
"Italia Oggi": {
"domain": "italiaoggi.it",
"allow_cookies": 1,
"ld_json": "div.boxAbb|div.article-locked",
"new_site": 1
},
"Outlook India": { "Outlook India": {
"domain": "outlookindia.com", "domain": "outlookindia.com",
"allow_cookies": 1, "allow_cookies": 1,