Fix Il Sole 24 Ore (24+ only)

This commit is contained in:
magnolia1234 2024-03-05 17:17:06 +01:00
parent 1ca39b53e0
commit 6b6e7bd0db
6 changed files with 24 additions and 9 deletions

View file

@ -665,7 +665,7 @@ Grouped in options:\
[Il Fatto Quotidiano](https://www.ilfattoquotidiano.it) -
[Il Foglio](https://www.ilfoglio.it) -
[Il Manifesto](https://ilmanifesto.it) -
[Il Sole 24 Ore](https://www.ilsole24ore.com) -
[Il Sole 24 Ore (24+)](https://24plus.ilsole24ore.com) -
[Internazionale](https://www.internazionale.it) -
[Italia Oggi](https://www.italiaoggi.it) -
[La Gazzetta dello Sport](https://www.gazzetta.it) -

View file

@ -32,6 +32,7 @@ var restrictions = {
'ft.com': /^((?!\/cn\.ft\.com\/).)*$/,
'hilltimes.com': /^((?!\.hilltimes\.com\/slideshow\/).)*$/,
'hindustantimes.com': /^((?!\/epaper\.hindustantimes\.com\/).)*$/,
'ilsole24ore.com': /^((?!\/ntplus.+\.ilsole24ore\.com\/).)*$/,
'livemint.com': /^((?!\/epaper\.livemint\.com\/).)*$/,
'lopinion.fr': /^((?!\.lopinion\.fr\/lejournal).)*$/,
'nytimes.com': /^((?!\/(help|myaccount|timesmachine)\.nytimes\.com\/).)*$/,
@ -539,7 +540,7 @@ ext_api.storage.local.get({
} else {
ext_api.management.getSelf(function (result) {
if ((result.installType === 'development' || (result.installType !== 'development' && !enabledSites.includes('#options_on_update')))) {
let new_groups = ['###_de_motor_presse', '###_il_haaretz_group', '###_usa_digiday'];
let new_groups = ['###_usa_digiday'];
let open_options = new_groups.some(group => !enabledSites.includes(group) && grouped_sites[group].some(domain => enabledSites.includes(domain) && !customSites_domains.includes(domain)));
if (open_options)
ext_api.runtime.openOptionsPage();
@ -1651,7 +1652,7 @@ function compareKey(firstStr, secondStr) {
function isSiteEnabled(details) {
var enabledSite = matchUrlDomain(enabledSites, details.url);
if (!ext_name.startsWith('Bypass Paywalls Clean'))
if (!ext_name.startsWith('Bypass Paywalls Clean') || !(self_hosted || /0$/.test(ext_version)))
enabledSite = '';
if (enabledSite in restrictions) {
return restrictions[enabledSite].test(details.url);

View file

@ -5,6 +5,7 @@ Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywal
Post-release
Remove Puck.news (fix obsolete)
Fix Boersen-zeitung.de (timing)
Fix Il Sole 24 Ore (24+ only)
* v3.5.8.0 (2024-03-03)
Add Autosport (free articles only)

View file

@ -2370,6 +2370,11 @@ else if (matchDomain('ilmanifesto.it')) {
}
else if (matchDomain('ilsole24ore.com')) {
let paywall = document.querySelector('div.lock');
if (paywall) {
removeDOMElement(paywall);
header_nofix(document.querySelector('div.paywalltext'));
}
let ads = document.querySelectorAll('div.background-adv, div.abox, div.ob-smartfeed-wrapper');
hideDOMElement(...ads);
}

View file

@ -50,11 +50,6 @@
"domain": "athensreviewofbooks.com",
"ld_json": "div.freeUser|div.itemBody"
},
"Bauernzeitung.ch": {
"allow_cookies": 1,
"domain": "bauernzeitung.ch",
"useragent": "googlebot"
},
"Bisnisindonesia.id": {
"allow_cookies": 1,
"domain": "bisnisindonesia.id",
@ -288,6 +283,13 @@
"domain": "gramophone.co.uk",
"useragent": "googlebot"
},
"Group_ch_agrarmedien": {
"allow_cookies": 1,
"cs_code": "[{\"cond\":\"[class*='advert']\", \"rm_elem\":1}]",
"domain": "group_ch_agrarmedien",
"group": "bauernzeitung.ch,diegruene.ch",
"useragent": "googlebot"
},
"Group_de_ozg": {
"allow_cookies": 1,
"domain": "group_de_ozg",
@ -343,6 +345,12 @@
"block_js_inline": "\\.heraldo\\.es\\/noticias",
"domain": "heraldo.es"
},
"Hochparterre.ch": {
"allow_cookies": 1,
"cs_code": "[{\"cond\":\"div.pageWrapper\", \"rm_class\":\"pageWrapper\"}]",
"domain": "hochparterre.ch",
"ld_google_webcache": "div.paywall|div.article__content"
},
"Hsj.co.uk": {
"allow_cookies": 1,
"domain": "hsj.co.uk",

View file

@ -1192,7 +1192,7 @@ var defaultSites = {
allow_cookies: 1,
block_regex: /(\.(cedscdn|cedsdigital)\.it\/.+\/PaywallMeter\.js|cdn\.ampproject\.org\/v\d\/amp-(access|consent|subscriptions)-.+\.(m)?js)/
},
"Il Sole 24 Ore": {
"Il Sole 24 Ore (24+ only)": {
domain: "ilsole24ore.com",
allow_cookies: 1,
block_regex: /(\.ilsole24ore\.com\/zephr\/feature|\.cloudfront\.net\/embed\/widget\/subx.+\.js)/