Fix Barron's (disable bot)

merge-requests/18/merge
magnolia1234 4 months ago
parent 3b0b54012b
commit 7d8e2e0e3a

@ -1061,7 +1061,6 @@ if (matchUrlDomain(change_headers, details.url) && !ignore_types.includes(detail
var mobile = details.requestHeaders.filter(x => x.name.toLowerCase() === "user-agent" && x.value.toLowerCase().includes("mobile")).length;
var googlebotEnabled = matchUrlDomain(use_google_bot, details.url) &&
!(matchUrlDomain(es_grupo_vocento_domains, details.url) && mobile) &&
!(matchUrlDomain('barrons.com', details.url) && enabledSites.includes('#options_disable_gb_barrons')) &&
!(matchUrlDomain(['economictimes.com', 'economictimes.indiatimes.com'], details.url) && !details.url.split(/\?|#/)[0].endsWith('.cms')) &&
!(matchUrlDomain(au_news_corp_domains, details.url) && (details.url.includes('?amp') || !mobile || (!matchUrlDomain(au_news_corp_no_amp_fix, details.url) && enabledSites.includes('#options_disable_gb_au_news_corp')))) &&
!(matchUrlDomain('nytimes.com', details.url) && details.url.includes('.nytimes.com/live/')) &&

@ -9,6 +9,7 @@ Add Mediahuis Belgie (fetch from archive.is)
Add Mediahuis Nederland Regional (fetch from archive.is)
Add Wiwo.de (fetch from archive.is)
Remove Franc-Tireur.fr (fix obsolete)
Fix Barron's (disable bot)
Fix Grupo Abril (images/embeds)
Fix Hearst magazines (js)
Fix Independent.co.uk (premium images)

@ -3467,7 +3467,7 @@ else if (matchDomain('barrons.com')) {
let ads = document.querySelectorAll('div[class*="_AdWrapper-"], div[class*="-adWrapper-"]');
hideDOMElement(...ads);
} else {
amp_unhide_subscr_section('.wsj-ad, amp-ad');
amp_unhide_subscr_section('.wsj-ad, amp-ad', false);
}
}

@ -51,5 +51,5 @@
"webRequestBlocking",
"*://*/*"
],
"version": "3.5.1.6"
"version": "3.5.1.7"
}

@ -839,5 +839,5 @@
"*://archive.vn/*",
"*://webcache.googleusercontent.com/*"
],
"version": "3.5.1.6"
"version": "3.5.1.7"
}

@ -214,11 +214,10 @@ var defaultSites = {
allow_cookies: 1,
cs_dompurify: 1
},
"Barron's (when blocked disable Googlebot in BPC-settings)": {
"Barron's": {
domain: "barrons.com",
allow_cookies: 1,
block_regex: /(cdn\.cxense\.com\/|cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js)/,
useragent: "googlebot"
block_regex: /(cdn\.cxense\.com\/|cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js)/
},
"BBC History Extra": {
domain: "historyextra.com",
@ -2886,9 +2885,6 @@ var defaultSites = {
"Australia News Corp - no Googlebot (blocked; only disabled when amp-fix)": {
domain: "#options_disable_gb_au_news_corp"
},
"Barron's - no Googlebot (http error 500)": {
domain: "#options_disable_gb_barrons"
},
}
if (typeof browser !== 'object') {

@ -1,4 +1,10 @@
{
"Barron's": {
"domain": "barrons.com",
"allow_cookies": 1,
"block_regex": "(cdn\\.cxense\\.com\\/|cdn\\.ampproject\\.org\\/v\\d\\/amp-subscriptions-.+\\.js)",
"upd_version": "3.5.1.7"
},
"Bloomberg": {
"domain": "bloomberg.com",
"allow_cookies": 1,
@ -100,7 +106,7 @@
],
"allow_cookies": 1,
"block_regex": "(\\.{domain}\\/(script||.+\\/tncms\\/api\\/access\\..+)\\.js|js\\.matheranalytics\\.com\\/)",
"upd_version": "3.5.1.6"
"upd_version": "3.5.1.7"
},
"The Indian Express": {
"domain": "indianexpress.com",

Loading…
Cancel
Save