Fix Hearst newspapers (anti-adblocker)

This commit is contained in:
magnolia1234 2024-03-08 12:11:32 +01:00
parent be52001abd
commit 0afed0a385
7 changed files with 45 additions and 25 deletions

View File

@ -8,6 +8,7 @@ Add Industry Dive (opt-in to custom sites)
Remove Puck.news (fix obsolete)
Fix Boersen-zeitung.de (timing)
Fix ElMundo.es (colegios - no amp-fix)
Fix Hearst newspapers (anti-adblocker)
Fix Il Sole 24 Ore (24+ only)
* v3.5.8.0 (2024-03-03)

View File

@ -4327,12 +4327,6 @@ else if (matchDomain('historyextra.com')) {
removeDOMElement(ad_banner);
}
else if (matchDomain(usa_hearst_comm_domains)) {
let wrapper = document.querySelector('.belowMastheadWrapper');
let ads = document.querySelectorAll('div.adModule');
hideDOMElement(wrapper, ...ads);
}
else if (matchDomain('inc42.com')) {
if (window.location.pathname.endsWith('/amp/')) {
amp_unhide_access_hide('="status"', '="NOT status"', 'amp-ad, amp-embed, div.wru-widget');
@ -6070,6 +6064,19 @@ else if (matchDomain(usa_gannett_domains) || document.querySelector('head > link
window.location.href = decodeURIComponent(window.location.href.split('?return=')[1]);
}
else if (matchDomain(usa_hearst_comm_domains) || document.querySelector('script[src*="/treg.hearstnp.com/"]')) {
let overlay = document.querySelector('div > div#modalOuter');
if (overlay) {
hideDOMElement(overlay.parentNode);
let noscroll = document.querySelector('body[style]');
if (noscroll)
noscroll.removeAttribute('style');
}
let ads = pageContains('div > div > p', 'Article continues below this ad');
for (let elem of ads)
hideDOMElement(elem.parentNode.parentNode);
}
else if ((domain = matchDomain(usa_lee_ent_domains)) || matchDomain(ca_torstar_domains.concat(['abqjournal.com'])) || document.querySelector('script[src*=".townnews.com/"][src*="/tncms/"]')) {
if (window.location.pathname.endsWith('.amp.html')) {
amp_unhide_access_hide('="hasAccess"', '="NOT hasAccess"', 'amp-ad, amp-embed, .amp-ads-container');

View File

@ -51,5 +51,5 @@
"webRequestBlocking",
"*://*/*"
],
"version": "3.5.8.4"
"version": "3.5.8.5"
}

View File

@ -1,6 +1,6 @@
{
"###_remove_sites": {
"cs_code": "bild.de, dn.se, faithfullymagazine.com, gazetaprawna.pl, gp.se, group_haaretz, handelsblatt.com, mailplus.co.uk, politiken.dk, theinformation.com",
"cs_code": "bild.de, dn.se, faithfullymagazine.com, gazetaprawna.pl, gp.se, group_haaretz, handelsblatt.com, lyrik.fr, mailplus.co.uk, politiken.dk, theinformation.com",
"domain": "###"
},
"Abajournal.com": {
@ -134,6 +134,11 @@
"block_regex": "\\.catholicherald\\.co\\.uk\\/c\\/assets\\/pigeon\\.js",
"domain": "catholicherald.co.uk"
},
"Causette.fr": {
"allow_cookies": 1,
"domain": "causette.fr",
"ld_json_url": "div.ihc-locker-wrap|div.entry-content"
},
"Chicago.suntimes.com": {
"allow_cookies": 1,
"block_regex": "\\.tinypass\\.com",
@ -314,6 +319,13 @@
"domain": "group_nation_media",
"group": "monitor.co.ug,nation.africa,thecitizen.co.tz"
},
"Group_uk_dcthomson": {
"allow_cookies": 1,
"block_regex": "\\.tinypass\\.com",
"cs_code": "[{\"cond\":\"div[rel='advert']\", \"rm_elem\":1}]",
"domain": "group_uk_dcthomson",
"group": "energyvoice.com,pressandjournal.co.uk,thecourier.co.uk"
},
"Group_uk_solar_media": {
"allow_cookies": 1,
"domain": "group_uk_solar_media",
@ -463,11 +475,6 @@
"domain": "luxurydaily.com",
"ld_json_url": "div.call-to-action|div.body|||meta[name='id']"
},
"Lyrik.fr": {
"allow_cookies": 1,
"block_regex": "\\.qiota\\.com",
"domain": "lyrik.fr"
},
"Makorrishon.co.il": {
"allow_cookies": 1,
"domain": "makorrishon.co.il",
@ -637,11 +644,6 @@
"domain": "portfolio.hu",
"useragent": "googlebot"
},
"Pressandjournal.co.uk": {
"allow_cookies": 1,
"domain": "pressandjournal.co.uk",
"useragent": "googlebot"
},
"Publishersweekly.com": {
"allow_cookies": 1,
"block_regex": "\\.omeda\\.com",
@ -818,11 +820,6 @@
"domain": "thecaterer.com",
"useragent": "googlebot"
},
"Thecourier.co.uk": {
"allow_cookies": 1,
"domain": "thecourier.co.uk",
"useragent": "googlebot"
},
"Thedailymash.co.uk": {
"allow_cookies": 1,
"block_regex": "\\.flip-pay\\.com",

View File

@ -853,5 +853,5 @@
"*://archive.vn/*",
"*://webcache.googleusercontent.com/*"
],
"version": "3.5.8.4"
"version": "3.5.8.5"
}

View File

@ -1125,7 +1125,7 @@ var defaultSites = {
remove_cookies: 1,
cs_code: [{"cond":"div#modal-register-popup, div.gating-banner", "rm_elem":1}, {"cond":"div[data-gated]", "rm_attrib":"data-gated"}]
},
"Hearst Communications (newspapers)": {
"Hearst Communications (newspapers; opt-in to custom sites for unlisted)": {
domain: "###_usa_hearst_comm",
group: [
"ctpost.com",

View File

@ -96,6 +96,21 @@
"useragent_custom": "Mozilla/5.0 (Java) outbrain",
"upd_version": "3.5.7.2"
},
"Hearst Communications (newspapers)": {
"domain": "###_usa_hearst_comm",
"group": [
"ctpost.com",
"expressnews.com",
"houstonchronicle.com",
"nhregister.com",
"sfchronicle.com",
"timesunion.com"
],
"allow_cookies": 1,
"block_regex": "(\\.{domain}\\/script\\.js|\\.ensighten\\.com\\/|js\\.matheranalytics\\.com\\/)",
"cs_code": "[{\"cond\":\"div#modals\", \"rm_elem\":1}, {\"cond\":\"body[style]\", \"rm_attrib\":\"style\"}]",
"upd_version": "3.5.8.5"
},
"Il Sole 24 Ore": {
"domain": "ilsole24ore.com",
"allow_cookies": 1,