Fix El Pais (menu subdomains)

This commit is contained in:
magnolia1234 2022-01-22 18:37:56 +01:00
parent 112d091cf1
commit a5526e436b
6 changed files with 20 additions and 31 deletions

View File

@ -597,7 +597,7 @@ Grouped in options:\
#### East Asia #### East Asia
[Asia Times](https://asiatimes.com) - [Asia Times](https://asiatimes.com) -
[CommonWealth Magazine Taiwan](https://www.cw.com.tw) - [CommonWealth Magazine Taiwan](https://www.cw.com.tw)* -
[DealStreetAsia](https://www.dealstreetasia.com) - [DealStreetAsia](https://www.dealstreetasia.com) -
[Harvard Business Review China](https://www.hbrchina.org) - [Harvard Business Review China](https://www.hbrchina.org) -
[Harvard Business Review Taiwan](https://www.hbrtaiwan.com) - [Harvard Business Review Taiwan](https://www.hbrtaiwan.com) -

View File

@ -21,7 +21,7 @@ var restrictions = {
'bloomberg.com': /^((?!\.bloomberg\.com\/news\/terminal\/).)*$/, 'bloomberg.com': /^((?!\.bloomberg\.com\/news\/terminal\/).)*$/,
'economictimes.com': /\.economictimes\.com($|\/($|(__assets|prime)(\/.+)?|.+\.cms))/, 'economictimes.com': /\.economictimes\.com($|\/($|(__assets|prime)(\/.+)?|.+\.cms))/,
'elespanol.com': /^((?!\/cronicaglobal\.elespanol\.com\/).)*$/, 'elespanol.com': /^((?!\/cronicaglobal\.elespanol\.com\/).)*$/,
'elpais.com': /(\/elpais\.com\/$|(static|imagenes(\.\w+)?)\.elpais\.com|\/(.+\.)?elpais\.com\/.+\.html)/, 'elpais.com': /(\/(.+\.)?elpais\.com\/.+\.html|(static|imagenes(\.\w+)?)\.elpais\.com)/,
'faz.net': /^((?!\.faz\.net\/aktuell\/(\?switchfaznet)?$).)*$/, 'faz.net': /^((?!\.faz\.net\/aktuell\/(\?switchfaznet)?$).)*$/,
'foreignaffairs.com': /\.foreignaffairs\.com\/((articles|fa-caching|interviews|reviews|sites)\/)/, 'foreignaffairs.com': /\.foreignaffairs\.com\/((articles|fa-caching|interviews|reviews|sites)\/)/,
'lastampa.it': /^((?!\/video\.lastampa\.it\/).)*$/, 'lastampa.it': /^((?!\/video\.lastampa\.it\/).)*$/,
@ -39,6 +39,10 @@ var restrictions = {
for (let domain of au_news_corp_domains) for (let domain of au_news_corp_domains)
restrictions[domain] = new RegExp('^((?!todayspaper\\.' + domain.replace(/\./g, '\\.') + '\\/).)*$'); restrictions[domain] = new RegExp('^((?!todayspaper\\.' + domain.replace(/\./g, '\\.') + '\\/).)*$');
if (typeof browser !== 'object') {
for (let domain of['elpais.com'])
restrictions[domain] = new RegExp('((\\/|\\.)' + domain.replace(/\./g, '\\.') + '\\/$|' + restrictions[domain].toString().replace(/(^\/|\/$)/g, '') + ')');
}
// Don't remove cookies before/after page load // Don't remove cookies before/after page load
var allow_cookies = []; var allow_cookies = [];
@ -598,7 +602,7 @@ ext_api.webRequest.onHeadersReceived.addListener(function (details) {
['blocking', 'responseHeaders']); ['blocking', 'responseHeaders']);
// block inline script // block inline script
var block_js_inline = ["*://elviajero.elpais.com/*", "*://retina.elpais.com/*", "*://verne.elpais.com/*", "*://*.medianama.com/*"]; var block_js_inline = ["*://*.medianama.com/*"];
ext_api.webRequest.onHeadersReceived.addListener(function (details) { ext_api.webRequest.onHeadersReceived.addListener(function (details) {
if (!isSiteEnabled(details)) { if (!isSiteEnabled(details)) {
return; return;
@ -686,7 +690,7 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) {
break; break;
} }
} }
var blocked_referer_domains = ['foreignaffairs.com', 'timeshighereducation.com']; var blocked_referer_domains = ['elpais.com', 'foreignaffairs.com', 'timeshighereducation.com'];
if (!header_referer && details.initiator) { if (!header_referer && details.initiator) {
header_referer = details.initiator; header_referer = details.initiator;
if (!blocked_referer && matchUrlDomain(blocked_referer_domains, details.url) && ['script', 'xmlhttprequest'].includes(details.type)) { if (!blocked_referer && matchUrlDomain(blocked_referer_domains, details.url) && ['script', 'xmlhttprequest'].includes(details.type)) {

View File

@ -8,6 +8,7 @@ Fix Asia Times
Fix Cairns Post, Code Sports & The Advertiser Fix Cairns Post, Code Sports & The Advertiser
Fix Challenges.fr Fix Challenges.fr
Fix Clarin Fix Clarin
Fix El Pais (menu subdomains)
Fix The New Yorker (update) Fix The New Yorker (update)
* v2.5.2.0 (2022-01-16) * v2.5.2.0 (2022-01-16)

View File

@ -189,9 +189,9 @@ else if (domain = matchDomain(["brisbanetimes.com.au", "smh.com.au", "theage.com
else { else {
// Australian Community Media newspapers // Australian Community Media newspapers
let au_cm_sites = ['bendigoadvertiser.com.au', 'bordermail.com.au', 'canberratimes.com.au', 'centralwesterndaily.com.au', 'dailyadvertiser.com.au', 'dailyliberal.com.au', 'examiner.com.au', 'illawarramercury.com.au', 'newcastleherald.com.au', 'northerndailyleader.com.au', 'portnews.com.au', 'standard.net.au', 'theadvocate.com.au', 'thecourier.com.au', 'westernadvocate.com.au']; let au_comm_media_domains = ['bendigoadvertiser.com.au', 'bordermail.com.au', 'canberratimes.com.au', 'centralwesterndaily.com.au', 'dailyadvertiser.com.au', 'dailyliberal.com.au', 'examiner.com.au', 'illawarramercury.com.au', 'newcastleherald.com.au', 'northerndailyleader.com.au', 'portnews.com.au', 'standard.net.au', 'theadvocate.com.au', 'thecourier.com.au', 'westernadvocate.com.au'];
let au_piano_script = document.querySelector('script[src="https://cdn-au.piano.io/api/tinypass.min.js"]'); let au_piano_script = document.querySelector('script[src="https://cdn-au.piano.io/api/tinypass.min.js"]');
if (matchDomain(au_cm_sites) || au_piano_script) { if (matchDomain(au_comm_media_domains) || au_piano_script) {
let subscribe_truncate = document.querySelector('.subscribe-truncate'); let subscribe_truncate = document.querySelector('.subscribe-truncate');
if (subscribe_truncate) if (subscribe_truncate)
subscribe_truncate.classList.remove('subscribe-truncate'); subscribe_truncate.classList.remove('subscribe-truncate');
@ -206,8 +206,8 @@ else {
removeDOMElement(story_generic_iframe, blocker); removeDOMElement(story_generic_iframe, blocker);
} else if (window.location.hostname.endsWith('.com.au')) { } else if (window.location.hostname.endsWith('.com.au')) {
// Australia News Corp // Australia News Corp
let au_nc_sites = ['adelaidenow.com.au', 'cairnspost.com.au', 'codesports.com.au', 'couriermail.com.au', 'dailytelegraph.com.au', 'geelongadvertiser.com.au', 'goldcoastbulletin.com.au', 'heraldsun.com.au', 'ntnews.com.au', 'theaustralian.com.au', 'thechronicle.com.au', 'themercury.com.au', 'townsvillebulletin.com.au', 'weeklytimesnow.com.au']; let au_news_corp_domains = ['adelaidenow.com.au', 'cairnspost.com.au', 'codesports.com.au', 'couriermail.com.au', 'dailytelegraph.com.au', 'geelongadvertiser.com.au', 'goldcoastbulletin.com.au', 'heraldsun.com.au', 'ntnews.com.au', 'theaustralian.com.au', 'thechronicle.com.au', 'themercury.com.au', 'townsvillebulletin.com.au', 'weeklytimesnow.com.au'];
if (domain = matchDomain(au_nc_sites)) { if (domain = matchDomain(au_news_corp_domains)) {
let header_ads = document.querySelector('.header_ads-container'); let header_ads = document.querySelector('.header_ads-container');
removeDOMElement(header_ads); removeDOMElement(header_ads);
let amp_ads_sel = 'amp-ad, amp-embed, [id^="ad-mrec-"], .story-ad-container'; let amp_ads_sel = 'amp-ad, amp-embed, [id^="ad-mrec-"], .story-ad-container';

View File

@ -245,7 +245,7 @@ var defaultSites = {
domain: "commentary.org", domain: "commentary.org",
block_regex: /\.commentary\.org\/.+\/js\/dg-locker-public\.js/ block_regex: /\.commentary\.org\/.+\/js\/dg-locker-public\.js/
}, },
"CommonWealth Magazine Taiwan": { "CommonWealth Magazine Taiwan (free articles only)": {
domain: "cw.com.tw" domain: "cw.com.tw"
}, },
"Correio da Manhã": { "Correio da Manhã": {

View File

@ -1,26 +1,4 @@
{ {
"Australia News Corp": {
"domain": "###_au_news_corp",
"group": [
"adelaidenow.com.au",
"cairnspost.com.au",
"codesports.com.au",
"couriermail.com.au",
"dailytelegraph.com.au",
"geelongadvertiser.com.au",
"goldcoastbulletin.com.au",
"heraldsun.com.au",
"ntnews.com.au",
"theaustralian.com.au",
"thechronicle.com.au",
"themercury.com.au",
"townsvillebulletin.com.au",
"weeklytimesnow.com.au"
],
"allow_cookies": 1,
"useragent": "googlebot",
"block_regex": "(\\.com\\.au\\/remote\\/identity\\/rampart\\/latest\\/rampart\\.js|cdn\\.ampproject\\.org\\/v\\d\\/amp-(access|ad)-.+\\.js)"
},
"Clarín": { "Clarín": {
"domain": "clarin.com", "domain": "clarin.com",
"allow_cookies": 1, "allow_cookies": 1,
@ -30,6 +8,12 @@
"domain": "huffingtonpost.it", "domain": "huffingtonpost.it",
"group_rule": "###_gr_it_repubblica_domains" "group_rule": "###_gr_it_repubblica_domains"
}, },
"###_gr_it_repubblica_domains": {
"group_rule_domains": ["gelocal.it", "huffingtonpost.it", "ilsecoloxix.it", "italian.tech", "lanuovasardegna.it", "lastampa.it", "lescienze.it", "limesonline.com", "repubblica.it"],
"allow_cookies": 1,
"block_regex": "(scripts\\.repubblica\\.it\\/pw\\/pw\\.js|cdn\\.ampproject\\.org\\/v\\d\\/amp-(access|ad|user-notification)-.+\\.js)",
"useragent": "googlebot"
},
"Mainichi Shimbun": { "Mainichi Shimbun": {
"domain": "mainichi.jp", "domain": "mainichi.jp",
"allow_cookies": 1, "allow_cookies": 1,