Fix Leaky Paywall (identify site)

This commit is contained in:
magnolia1234 2023-02-08 21:58:02 +01:00
parent 21631ed7ad
commit 87247c40cd
7 changed files with 49 additions and 15 deletions

View file

@ -2,7 +2,8 @@
Changelog Bypass Paywalls Clean - Firefox
Post-release
Fix Koelner Stadt-Anzeiger (regwall)
Fix Koelner Stadt-Anzeiger
Fix Leaky Paywall (identify site)
Fix LesEchos.fr (json)
Fix McClatchy Group (amp-redirect)
Fix The West Australian (regional; identify site)

View file

@ -309,12 +309,12 @@ else {
let scripts = document.querySelectorAll('script:not([src], [type])');
let json_script;
for (let script of scripts) {
if (script.innerText.includes('window.PAGE_DATA =')) {
if (script.text.includes('window.PAGE_DATA =')) {
json_script = script;
break;
}
}
if (json_script && json_script.text.includes('window.PAGE_DATA =')) {
if (json_script) {
let json_text = json_script.text.split('window.PAGE_DATA =')[1].split('</script')[0];
json_text = json_text.replace(/undefined/g, '"undefined"');
try {
@ -395,6 +395,17 @@ else {
par_elem.appendChild(par_sub2);
}
}
} else if (par.kind === 'inline-related') {
par_elem = document.createElement('p');
if (par.publications) {
for (let elem of par.publications) {
let par_link = document.createElement('a');
par_link.href = elem._self;
par_link.innerText = elem.heading;
par_elem.appendChild(par_link);
par_elem.appendChild(document.createElement('br'));
}
}
} else {
par_elem = document.createElement('p');
par_elem.innerText = par.text;
@ -416,7 +427,7 @@ else {
}
removeDOMElement(breach_screen);
}
}, 1500);
}, 2000);
let header_advert = document.querySelector('.headerAdvertisement');
hideDOMElement(header_advert);
}
@ -683,8 +694,14 @@ else if (matchDomain(['ksta.de', 'rundschau-online.de'])) {
let span_hidden = document.querySelector('div.dm-paint');
if (span_hidden)
span_hidden.removeAttribute('class');
} else {
let paywall_new = document.querySelector('div.paywalled-content');
if (paywall_new)
paywall_new.removeAttribute('class');
let wrapper = document.querySelector('div.dm-paywall-wrapper');
removeDOMElement(wrapper);
}
let banners = document.querySelectorAll('div.dm-slot');
let banners = document.querySelectorAll('div.dm-slot, div[id^="taboola-feed"]');
removeDOMElement(...banners);
}

View file

@ -35,7 +35,7 @@ window.setTimeout(function () {
if (hostname) {
if (document.querySelector('script[src*=".medium.com/"]') || matchDomain(['plainenglish.io']))
group = '###_medium_custom';
else if (document.querySelector('script[src*="/leaky-paywall/"], script[src*="/leaky-paywall-"]'))
else if (document.querySelector('script[src*="/leaky-paywall"], link[href*="/leaky-paywall"]'))
group = '###_wp_leaky_paywall';
else if (document.querySelector('script[src*="/substackcdn.com/"], link[rel="stylesheet"][href*="/substackcdn.com/"]'))
group = '###_substack_custom';// no fix

View file

@ -166,6 +166,11 @@
"block_regex": "js\\.pelcro\\.com",
"domain": "hartenergy.com"
},
"Hbook.com": {
"allow_cookies": 1,
"block_regex": "\\.hbook\\.com\\/.+\\/js\\/metering\\.js",
"domain": "hbook.com"
},
"Heidi.news": {
"allow_cookies": 1,
"block_regex": "\\.piano\\.io",
@ -211,6 +216,10 @@
"block_regex": "\\.irishexaminer\\.com\\/pu_examiner\\/scripts\\/engage",
"domain": "irishexaminer.com"
},
"Irishnews.com (not premium)": {
"block_regex": "\\.irishnews\\.com\\/.+\\/js\\/mpppaywall\\.js",
"domain": "irishnews.com"
},
"Kapital.no": {
"allow_cookies": 1,
"domain": "kapital.no",
@ -221,6 +230,11 @@
"domain": "lagazettedescommunes.com",
"useragent": "googlebot"
},
"Libraryjournal.com": {
"allow_cookies": 1,
"block_regex": "\\.libraryjournal.com\\.com\\/.+\\/js\\/metering\\.js",
"domain": "libraryjournal.com"
},
"Lindipendente.online": {
"allow_cookies": 1,
"domain": "lindipendente.online",
@ -327,6 +341,11 @@
"block_regex": "js\\.pelcro\\.com",
"domain": "siliconrepublic.com"
},
"Slj.com": {
"allow_cookies": 1,
"block_regex": "\\.slj\\.com\\/.+\\/js\\/metering\\.js",
"domain": "slj.com"
},
"Sltrib.com": {
"allow_cookies": 1,
"block_regex": "\\.tinypass\\.com",

View file

@ -730,5 +730,5 @@
"*://*.wallkit.net/*",
"*://webcache.googleusercontent.com/*"
],
"version": "3.0.4.3"
"version": "3.0.4.4"
}

View file

@ -998,13 +998,11 @@ var defaultSites = {
},
"Kölner Stadt-Anzeiger": {
domain: "ksta.de",
allow_cookies: 1,
block_regex: /\.ksta\.de\/_nuxt\/AdContainer.+\.js/
allow_cookies: 1
},
"Kölnische Rundschau": {
domain: "rundschau-online.de",
allow_cookies: 1,
block_regex: /\.rundschau-online\.de\/_nuxt\/AdContainer.+\.js/
allow_cookies: 1
},
"Krant van West-Vlaanderen": {
domain: "kw.be",
@ -2432,13 +2430,12 @@ var custom_flex_not = {
"###_ca_postmedia": ["canada.com", "canoe.com", "driving.ca"],
"###_de_dfv_medien": ["dfv.de"],
"###_de_madsack": ["madsack.de", "madsack-medien-campus.de"],
"###_wp_leaky_paywall": ["griffithreview.com", "nknews.org", "thewirechina.com"],
"###_wp_leaky_paywall": ["thewirechina.com"],
"###_medium_custom": ["medium.com"],
"###_uk_axate.io": ["thinkofx.net"],
"###_usa_gannett": ["usatoday.com"],
"###_usa_hearst_comm": ["sfgate.com"],
"###_usa_mcc": ["mcclatchy.com"],
"###_usa_townnews": ["townnews.com", "nola.com", "theadvocate.com"]
"###_usa_townnews": ["townnews.com"]
}
var custom_flex_domains;
var custom_flex_not_domains;

View file

@ -69,7 +69,7 @@
"Kölner Stadt-Anzeiger": {
"domain": "ksta.de",
"allow_cookies": 1,
"block_regex": "\\.ksta\\.de\\/_nuxt\\/AdContainer.+\\.js"
"cs_code": "[{\"cond\":\"div.paywalled-content\",\"rm_attrib\":\"class\",\"elems\":[{\"cond\":\"div.dm-paywall-wrapper\",\"rm_elem\":1}]}]"
},
"Los Angeles Times": {
"domain": "latimes.com",