Add Madavor Media sites (opt-in to custom sites)

This commit is contained in:
magnolia1234 2022-09-18 16:41:03 +02:00
parent 14aadd4ebc
commit 47a52c7762
6 changed files with 22 additions and 8 deletions

View file

@ -213,7 +213,9 @@ Grouped in options:\
[Runner's World](https://www.runnersworld.com) - [Runner's World](https://www.runnersworld.com) -
[The Hollywood Reporter](https://www.hollywoodreporter.com) - [The Hollywood Reporter](https://www.hollywoodreporter.com) -
[Town & Country](https://www.townandcountrymag.com) - [Town & Country](https://www.townandcountrymag.com) -
[Women's Health](https://www.womenshealthmag.com)\ [Women's Health](https://www.womenshealthmag.com)
*[Madavor Media](https://www.madavor.com)* sites (opt-in to custom sites)\
*Outside magazines* sites like\ *Outside magazines* sites like\
[Backpacker](https://www.backpacker.com) - [Backpacker](https://www.backpacker.com) -
[Beta](https://www.betamtb.com) - [Beta](https://www.betamtb.com) -

View file

@ -914,10 +914,16 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) {
if (usa_mng_domain) if (usa_mng_domain)
usa_mng_domains = customAddRules(usa_mng_domains, '', blockedRegexes['denverpost.com']); usa_mng_domains = customAddRules(usa_mng_domains, '', blockedRegexes['denverpost.com']);
else if (header_referer_hostname.match(/\.com$/)) { else if (header_referer_hostname.match(/\.com$/)) {
// set googlebot-useragent for PEI Media sites // block cookies for Madavor Media sites
var usa_pei_domain = (details.url.match(/\.com\/wp-content\/plugins\/pragmatic-pei-rebranding\/assets\/img\/.+-logo\.svg$/) && ['image', 'xmlhttprequest'].includes(details.type) && details.url.includes(header_referer_hostname) && !matchUrlDomain(usa_pei_domains, header_referer) && enabledSites.includes('###_usa_pei')); var usa_madavor_domain = (details.url.match(/\.com\/wp-content\/(plugins|themes)\/madavor-/) && ['script'].includes(details.type) && details.url.includes(header_referer_hostname) && !matchUrlDomain(usa_madavor_domains, header_referer) && enabledSites.includes('###_usa_madavor'));
if (usa_pei_domain) if (usa_madavor_domain)
usa_pei_domains = customAddRules(usa_pei_domains, {allow_cookies: 1}, '', 'googlebot'); usa_madavor_domains = customAddRules(usa_madavor_domains);
else {
// set googlebot-useragent for PEI Media sites
var usa_pei_domain = (details.url.match(/\.com\/wp-content\/plugins\/pragmatic-pei-rebranding\/assets\/img\/.+-logo\.svg$/) && ['image', 'xmlhttprequest'].includes(details.type) && details.url.includes(header_referer_hostname) && !matchUrlDomain(usa_pei_domains, header_referer) && enabledSites.includes('###_usa_pei'));
if (usa_pei_domain)
usa_pei_domains = customAddRules(usa_pei_domains, {allow_cookies: 1}, '', 'googlebot');
}
} }
} }
} }

View file

@ -4,6 +4,7 @@ Changelog Bypass Paywalls Clean - Firefox
Post-release Post-release
Add 60 Millions de consommateurs Add 60 Millions de consommateurs
Add BusinessPost.ie Add BusinessPost.ie
Add Madavor Media sites (opt-in to custom sites)
Add Private Equity News Add Private Equity News
Add TheNewEuropean.co.uk Add TheNewEuropean.co.uk
Add Weltkunst.de Add Weltkunst.de

View file

@ -2965,7 +2965,8 @@ else if (matchDomain('historyextra.com')) {
else if (matchDomain(usa_hearst_comm_domains)) { else if (matchDomain(usa_hearst_comm_domains)) {
let wrapper = document.querySelector('.belowMastheadWrapper'); let wrapper = document.querySelector('.belowMastheadWrapper');
removeDOMElement(wrapper); let ads = document.querySelectorAll('div.adModule');
removeDOMElement(wrapper, ...ads);
} }
else if (matchDomain('inc42.com')) { else if (matchDomain('inc42.com')) {

View file

@ -707,5 +707,5 @@
"*://gcm.omerlocdn.com/*", "*://gcm.omerlocdn.com/*",
"*://webcache.googleusercontent.com/*" "*://webcache.googleusercontent.com/*"
], ],
"version": "2.8.4.8" "version": "2.8.4.9"
} }

View file

@ -1097,6 +1097,9 @@ var defaultSites = {
domain: "latimes.com", domain: "latimes.com",
block_regex: /(metering\.platform\.latimes\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|subscriptions)-.+\.js)/ block_regex: /(metering\.platform\.latimes\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|subscriptions)-.+\.js)/
}, },
"Madavor Media (opt-in to custom sites)": {
domain: "###_usa_madavor"
},
"Madsack Mediengruppe": { "Madsack Mediengruppe": {
domain: "###_de_madsack", domain: "###_de_madsack",
group: [ group: [
@ -2185,7 +2188,7 @@ var nl_mediahuis_region_domains = grouped_sites['###_nl_mediahuis_region'];
var no_nhst_media_domains = grouped_sites['###_no_nhst_media']; var no_nhst_media_domains = grouped_sites['###_no_nhst_media'];
// custom domains (background) // custom domains (background)
var au_comm_media_domains, au_thewest_domains, ca_gcm_domains, ca_postmedia_domains, ch_media_domains, cl_emol_region_domains, de_funke_medien_domains, de_madsack_domains, es_epiberica_domains, medium_custom_domains, nl_mediahuis_noord_domains, substack_custom_domains, usa_gannett_domains, usa_hearst_comm_domains, usa_lee_ent_domains, usa_mcc_domains, usa_mng_domains, usa_pei_domains, usa_townnews_domains; var au_comm_media_domains, au_thewest_domains, ca_gcm_domains, ca_postmedia_domains, ch_media_domains, cl_emol_region_domains, de_funke_medien_domains, de_madsack_domains, es_epiberica_domains, medium_custom_domains, nl_mediahuis_noord_domains, substack_custom_domains, usa_gannett_domains, usa_hearst_comm_domains, usa_lee_ent_domains, usa_madavor_domains, usa_mcc_domains, usa_mng_domains, usa_pei_domains, usa_townnews_domains;
function init_custom_domains() { function init_custom_domains() {
au_comm_media_domains = grouped_sites['###_au_comm_media']; au_comm_media_domains = grouped_sites['###_au_comm_media'];
@ -2203,6 +2206,7 @@ function init_custom_domains() {
usa_gannett_domains = grouped_sites['###_usa_gannett']; usa_gannett_domains = grouped_sites['###_usa_gannett'];
usa_hearst_comm_domains = grouped_sites['###_usa_hearst_comm']; usa_hearst_comm_domains = grouped_sites['###_usa_hearst_comm'];
usa_lee_ent_domains = grouped_sites['###_usa_lee_ent']; usa_lee_ent_domains = grouped_sites['###_usa_lee_ent'];
usa_madavor_domains = [];
usa_mcc_domains = grouped_sites['###_usa_mcc']; usa_mcc_domains = grouped_sites['###_usa_mcc'];
usa_mng_domains = grouped_sites['###_usa_mng']; usa_mng_domains = grouped_sites['###_usa_mng'];
usa_pei_domains = []; usa_pei_domains = [];