Fix Gruppo SAE.it

This commit is contained in:
magnolia1234 2023-05-18 08:22:47 +02:00
parent 3d272a896a
commit 2175c904d5
8 changed files with 21 additions and 45 deletions

View File

@ -611,11 +611,10 @@ Grouped in options:\
[Il Fatto Quotidiano](https://www.ilfattoquotidiano.it) - [Il Fatto Quotidiano](https://www.ilfattoquotidiano.it) -
[Il Foglio](https://www.ilfoglio.it) - [Il Foglio](https://www.ilfoglio.it) -
[Il Manifesto](https://ilmanifesto.it) - [Il Manifesto](https://ilmanifesto.it) -
[Il Tirreno](https://www.iltirreno.it) -
[Internazionale](https://www.internazionale.it) - [Internazionale](https://www.internazionale.it) -
[Italia Oggi](https://www.italiaoggi.it) - [Italia Oggi](https://www.italiaoggi.it) -
[La Gazzetta dello Sport](https://www.gazzetta.it) - [La Gazzetta dello Sport](https://www.gazzetta.it)
[La Nuova Sardegna](https://www.lanuovasardegna.it)
Grouped in options:\ Grouped in options:\
*Gruppo GEDI.it* sites like\ *Gruppo GEDI.it* sites like\
@ -635,6 +634,10 @@ Grouped in options:\
[Il Telegrafo Livorno](https://www.iltelegrafolivorno.it) - [Il Telegrafo Livorno](https://www.iltelegrafolivorno.it) -
[La Nazione](https://www.lanazione.it) [La Nazione](https://www.lanazione.it)
*[Gruppo SAE.it](https://www.grupposae.it/i-quotidiani)** sites like\
[Il Tirreno](https://www.iltirreno.it)* -
[La Nuova Sardegna](https://www.lanuovasardegna.it)*
##### Netherlands/Flanders ##### Netherlands/Flanders
[De Limburger](https://www.limburger.nl) - [De Limburger](https://www.limburger.nl) -
[De Tijd](https://www.tijd.be) - [De Tijd](https://www.tijd.be) -

View File

@ -12,7 +12,7 @@ if (typeof ext_api.action !== 'object') {
ext_api.action = ext_api.browserAction; ext_api.action = ext_api.browserAction;
} }
const dompurify_sites = ['arcinfo.ch', 'belfasttelegraph.co.uk', 'bloomberg.com', 'cicero.de', 'defector.com', 'ilmanifesto.it', 'iltirreno.it', 'inc42.com', 'independent.ie', 'ipolitics.ca', 'italiaoggi.it', 'jacobin.de', 'lanuovasardegna.it', 'lecourrierdesstrateges.fr', 'lesechos.fr', 'marianne.net', 'newleftreview.org', 'newscientist.com', 'outlookbusiness.com', 'prospectmagazine.co.uk', 'sloanreview.mit.edu', 'stratfor.com', 'stylist.co.uk', 'techinasia.com', 'thebulletin.org', 'vn.nl', 'zerohedge.com'].concat(nl_mediahuis_noord_domains, nl_mediahuis_region_domains, no_nhst_media_domains); const dompurify_sites = ['arcinfo.ch', 'belfasttelegraph.co.uk', 'bloomberg.com', 'cicero.de', 'defector.com', 'ilmanifesto.it', 'inc42.com', 'independent.ie', 'ipolitics.ca', 'italiaoggi.it', 'jacobin.de', 'lecourrierdesstrateges.fr', 'lesechos.fr', 'marianne.net', 'newleftreview.org', 'newscientist.com', 'outlookbusiness.com', 'prospectmagazine.co.uk', 'sloanreview.mit.edu', 'stratfor.com', 'stylist.co.uk', 'techinasia.com', 'thebulletin.org', 'vn.nl', 'zerohedge.com'].concat(nl_mediahuis_noord_domains, nl_mediahuis_region_domains, no_nhst_media_domains);
var optin_setcookie = false; var optin_setcookie = false;
var optin_update = true; var optin_update = true;
var blocked_referer = false; var blocked_referer = false;
@ -428,7 +428,7 @@ ext_api.storage.local.get({
} else { } else {
ext_api.management.getSelf(function (result) { ext_api.management.getSelf(function (result) {
if ((result.installType === 'development' || (result.installType !== 'development' && !enabledSites.includes('#options_on_update')))) { if ((result.installType === 'development' || (result.installType !== 'development' && !enabledSites.includes('#options_on_update')))) {
let new_groups = ['###_ar_grupo_clarin', '###_be_groupe_ipm', '###_be_roularta', '###_de_noz_mhn', '###_uk_nat_world']; let new_groups = ['###_ar_grupo_clarin', '###_be_groupe_ipm', '###_be_roularta', '###_de_noz_mhn', '###_it_gruppo_sae', '###_uk_nat_world'];
let open_options = new_groups.some(group => !enabledSites.includes(group) && grouped_sites[group].some(domain => enabledSites.includes(domain) && !customSites_domains.includes(domain))) || let open_options = new_groups.some(group => !enabledSites.includes(group) && grouped_sites[group].some(domain => enabledSites.includes(domain) && !customSites_domains.includes(domain))) ||
(enabledSites.includes('tinypass.com') && !enabledSites.includes('piano.io')); (enabledSites.includes('tinypass.com') && !enabledSites.includes('piano.io'));
if (open_options) if (open_options)

View File

@ -4,6 +4,7 @@ Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywal
Post-release Post-release
Remove (custom) Substack (fix obsolete) Remove (custom) Substack (fix obsolete)
Fix Gruppo SAE.it (free articles only)
Fix Tagesspiegel.de (not background/checkpoint) Fix Tagesspiegel.de (not background/checkpoint)
Update custom sites/popup (remove Google Search Tool) Update custom sites/popup (remove Google Search Tool)

View File

@ -1942,39 +1942,8 @@ else if (matchDomain('ilmanifesto.it')) {
}, 1000); }, 1000);
} }
else if (matchDomain(['iltirreno.it', 'lanuovasardegna.it'])) { else if (matchDomain(['iltirreno.it', 'lanuovasardegna.it']) || matchDomain(['gazzettadimodena.it', 'gazzettadireggio.it', 'lanuovaferrara.it'])) {
if (window.location.pathname.includes('/news/')) { if (window.location.pathname.includes('/news/')) {
let paywall = document.querySelector('div.MuiBox-root > h4.MuiTypography-h4');
if (paywall && dompurify_loaded) {
let article = document.querySelector('div.MuiGrid-root.MuiGrid-grid-sm-7 > div');
if (article) {
removeDOMElement(paywall.parentNode);
try {
fetch(window.location.href)
.then(response => {
if (response.ok) {
response.text().then(html => {
let parser = new DOMParser();
let doc = parser.parseFromString(html, 'text/html');
let json = doc.querySelector('script#__NEXT_DATA__');
if (json) {
let article_new = JSON.parse(json.text).props.pageProps.article.content;
if (article_new) {
let parser = new DOMParser();
let doc = parser.parseFromString('<div>' + DOMPurify.sanitize(article_new) + '</div>', 'text/html');
let content_new = doc.querySelector('div');
article.innerHTML = '';
article.appendChild(content_new);
}
}
})
}
});
} catch (err) {
console.log(err);
}
}
}
window.setTimeout(function () { window.setTimeout(function () {
let banners = document.querySelectorAll('div.MuiSnackbar-root, div.css-16cchgy'); let banners = document.querySelectorAll('div.MuiSnackbar-root, div.css-16cchgy');
removeDOMElement(...banners); removeDOMElement(...banners);

View File

@ -85,6 +85,8 @@ window.setTimeout(function () {
} else if (hostname.endsWith('.it')) { } else if (hostname.endsWith('.it')) {
if (document.querySelector('link[href^="//citynews.stgy.ovh/"]')) if (document.querySelector('link[href^="//citynews.stgy.ovh/"]'))
group = '###_it_citynews';// no fix group = '###_it_citynews';// no fix
else if (matchDomain(['gazzettadimodena.it', 'gazzettadireggio.it', 'lanuovaferrara.it']))
group = '###_it_gruppo_sae';
} else if (hostname.endsWith('.nl')) { } else if (hostname.endsWith('.nl')) {
if (document.querySelector('script[src*=".ndcmediagroep.nl/"]')) if (document.querySelector('script[src*=".ndcmediagroep.nl/"]'))
group = '###_nl_mediahuis_noord'; group = '###_nl_mediahuis_noord';

View File

@ -51,5 +51,5 @@
"webRequestBlocking", "webRequestBlocking",
"*://*/*" "*://*/*"
], ],
"version": "3.1.8.1" "version": "3.1.8.2"
} }

View File

@ -753,5 +753,5 @@
"*://*.wallkit.net/*", "*://*.wallkit.net/*",
"*://webcache.googleusercontent.com/*" "*://webcache.googleusercontent.com/*"
], ],
"version": "3.1.8.1" "version": "3.1.8.2"
} }

View File

@ -879,6 +879,13 @@ var defaultSites = {
allow_cookies: 1, allow_cookies: 1,
block_regex: /(scripts\.repubblica\.it\/pw\/pw\.js|cdn\.ampproject\.org\/v\d\/amp-(access|user-notification)-.+\.js)/ block_regex: /(scripts\.repubblica\.it\/pw\/pw\.js|cdn\.ampproject\.org\/v\d\/amp-(access|user-notification)-.+\.js)/
}, },
"Gruppo SAE.it (free articles only)": {
domain: "###_it_gruppo_sae",
group: [
"iltirreno.it",
"lanuovasardegna.it"
]
},
"Haaretz English": { "Haaretz English": {
domain: "haaretz.com", domain: "haaretz.com",
allow_cookies: 1, allow_cookies: 1,
@ -980,9 +987,6 @@ var defaultSites = {
allow_cookies: 1, allow_cookies: 1,
block_regex: /(\.(cedscdn|cedsdigital)\.it\/.+\/PaywallMeter\.js|cdn\.ampproject\.org\/v\d\/amp-(access|consent|subscriptions)-.+\.(m)?js)/ block_regex: /(\.(cedscdn|cedsdigital)\.it\/.+\/PaywallMeter\.js|cdn\.ampproject\.org\/v\d\/amp-(access|consent|subscriptions)-.+\.(m)?js)/
}, },
"Il Tirreno": {
domain: "iltirreno.it"
},
"Inc.com": { "Inc.com": {
domain: "inc.com", domain: "inc.com",
block_regex: /\.tinypass\.com\// block_regex: /\.tinypass\.com\//
@ -1118,9 +1122,6 @@ var defaultSites = {
allow_cookies: 1, allow_cookies: 1,
block_regex: /(\.weborama\.fr\/|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/ block_regex: /(\.weborama\.fr\/|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/
}, },
"La Nuova Sardegna": {
domain: "lanuovasardegna.it"
},
"La Segunda": { "La Segunda": {
domain: "lasegunda.com", domain: "lasegunda.com",
block_regex: /\.(lasegunda\.com|emol\.cl)\/(.+\/)?js\/(.+\/)?(modal|merPramV\d|PramModal\.min)\.js/ block_regex: /\.(lasegunda\.com|emol\.cl)\/(.+\/)?js\/(.+\/)?(modal|merPramV\d|PramModal\.min)\.js/