Fix CartaCapital.com.br (freemium)

merge-requests/20/head
magnolia1234 4 months ago
parent f014f7771e
commit 4a6dc879b5

@ -1517,7 +1517,7 @@ ext_api.runtime.onMessage.addListener(function (message, sender) {
let custom_domain = message.data.domain;
let group = message.data.group;
if (group) {
let nofix_groups = ['###_fi_alma_talent', '###_it_citynews', '###_nl_vmnmedia', '###_substack_custom', '###_uk_delinian'];
let nofix_groups = ['###_fi_alma_talent', '###_fi_kaleva', '###_it_citynews', '###_nl_vmnmedia', '###_substack_custom', '###_uk_delinian'];
if (!custom_flex_domains.includes(custom_domain)) {
if (!nofix_groups.includes(group)) {
if (custom_flex[group])

@ -7,6 +7,7 @@ Add 3 more Gannett sites
Add CH Media (opt-in to custom sites for unlisted)
Add Sourcing Journal (Penske)
Fix Advance Local (json)
Fix CartaCapital.com.br (freemium)
Fix Groupe ESH Medias (iframely)
Fix Grupo Vocento (limit amp-redirect)
Fix Kurier.at (js & css)

@ -3258,28 +3258,40 @@ else if (matchDomain('cambiocolombia.com')) {
}
else if (matchDomain('cartacapital.com.br')) {
let paywall = document.querySelector('aside.paywall');
if (paywall) {
removeDOMElement(paywall);
let json_script = getArticleJsonScript();
if (json_script) {
try {
let json = JSON.parse(json_script.text);
if (json) {
let json_text = json[1].articleBody.replace(/\s{2,}/g, '\r\n\r\n');
let content = document.querySelector('section.s-content__text');
if (json_text && content) {
content.innerHTML = '';
let article_new = document.createElement('p');
article_new.innerText = json_text;
content.appendChild(article_new);
if (!window.location.pathname.endsWith('/amp/')) {
let paywall = document.querySelector('aside.paywall');
if (paywall) {
removeDOMElement(paywall);
let json_script = getArticleJsonScript();
if (json_script) {
try {
let json = JSON.parse(json_script.text);
if (json) {
let json_text = json[1].articleBody.replace(/\s{2,}/g, '\r\n\r\n');
let content = document.querySelector('section.s-content__text');
if (json_text && content) {
content.innerHTML = '';
let article_new = document.createElement('p');
article_new.innerText = json_text;
content.appendChild(article_new);
}
}
} catch (err) {
console.log(err);
}
} catch (err) {
console.log(err);
}
} else {
let content_soft = document.querySelector('div.contentSoft');
if (content_soft) {
content_soft.removeAttribute('class');
let freemium = document.querySelectorAll('div[class^="s-freemium"], div.maggazine-add');
removeDOMElement(...freemium);
}
}
}
let ads = document.querySelectorAll('div.div_ros_topo');
hideDOMElement(...ads);
} else
ampToHtml();
}
else if (matchDomain('crusoe.com.br')) {
@ -3508,7 +3520,7 @@ else if (window.location.hostname.endsWith('.cl') && document.querySelector('hea
else
csDone = true;
} else {//other (like com/org & not at/be/br/ch/cl/de/dk/fi/fr/es/ie/nl/no/pe/pt/se/uk))
} else {//other (like com/org & not ar/at/au/be/br/cat/ch/cl/de/dk/fi/fr/es/ie/nl/pe/pt/se/uk/uy))
if (matchDomain(usa_adv_local_domains)) {
if (window.location.search.startsWith('?outputType=amp')) {

@ -84,6 +84,8 @@ window.setTimeout(function () {
} else if (hostname.endsWith('.fi')) {
if (document.querySelector('head > link[href^="https://assets.almatalent.fi"]'))
group = '###_fi_alma_talent';// no fix
else if (document.querySelector('head[prefix*=".kalevamedia.fi/"]'))
group = '###_fi_kaleva';// no fix
} else if (hostname.endsWith('.fr')) {
if (document.querySelector('head > meta[name="google-play-app"][content^="app-id=com.centrefrance"]'))
group = '###_fr_gcf';

@ -51,5 +51,5 @@
"webRequestBlocking",
"*://*/*"
],
"version": "3.5.5.6"
"version": "3.5.5.7"
}

@ -730,6 +730,11 @@
"block_regex": "\\.tinypass\\.com",
"domain": "supchina.com"
},
"T3n.de": {
"allow_cookies": 1,
"domain": "t3n.de",
"ld_json": "div.c-pro-wall__wrapper|div.pro-blur>p"
},
"Tamedia.ch (refresh)": {
"add_ext_link": "div#piano-premium|p[class^='ArticleParagraph_root_']",
"add_ext_link_type": "google_search_tool",
@ -823,6 +828,11 @@
"block_regex": "\\/thenationalpulse\\.com\\/wp-content\\/.+\\/assets\\/js\\/national-pulse\\.js",
"domain": "thenationalpulse.com"
},
"Theqt.online": {
"allow_cookies": 1,
"domain": "theqt.online",
"ld_json_url": "section.elementor-section|div.post_center_side_text"
},
"Thestage.co.uk": {
"add_ext_link": "div#ao-MeteringDNAllow|div[class*='-Teaser']",
"add_ext_link_type": "archive.is",

@ -859,5 +859,5 @@
"*://archive.vn/*",
"*://webcache.googleusercontent.com/*"
],
"version": "3.5.5.6"
"version": "3.5.5.7"
}

@ -18,6 +18,12 @@
"block_regex": "(\\.cm\\.bloomberg\\.com\\/|assets\\.bwbx\\.io\\/s\\d\\/javelin\\/.+\\/transporter\\/)",
"upd_version": "3.2.7.1"
},
"CartaCapital": {
"domain": "cartacapital.com.br",
"allow_cookies": 1,
"cs_code": "[{\"cond\":\"div.contentSoft\", \"rm_attrib\":\"class\"}]",
"upd_version": "3.5.5.7"
},
"Daily Mail UK": {
"domain": "dailymail.co.uk",
"allow_cookies": 1,

Loading…
Cancel
Save