Fix ABC.es (mobile)
This commit is contained in:
parent
195441effc
commit
b81483744d
@ -920,6 +920,7 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) {
|
||||
if (matchUrlDomain(change_headers, details.url) && !['font', 'image', 'stylesheet'].includes(details.type)) {
|
||||
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('abc.es', details.url) && mobile) &&
|
||||
!(matchUrlDomain('barrons.com', details.url) && enabledSites.includes('#options_disable_gb_barrons')) &&
|
||||
!(matchUrlDomain('thetimes.co.uk', details.url) && !(details.url.match(/\/epaper\.thetimes\.co\.uk\/article\//) || mobile)) &&
|
||||
!(matchUrlDomain('wsj.com', details.url) && enabledSites.includes('#options_disable_gb_wsj'));
|
||||
|
@ -5,6 +5,7 @@ Post-release
|
||||
Add Aftonbladet.se
|
||||
Add Investors' Chronicle (UK)
|
||||
Add Nzz.ch Regional (opt-in to custom sites)
|
||||
Fix ABC.es (mobile)
|
||||
Fix Adweek (free articles only)
|
||||
Fix Quartz (newsletter)
|
||||
Update block general paywall script (Ensighten)
|
||||
|
@ -1037,10 +1037,16 @@ else
|
||||
} else if (window.location.hostname.match(/\.(es|pt)$/) || matchDomain(['diariocordoba.com', 'diariovasco.com', 'elconfidencial.com', 'elcorreo.com', 'elespanol.com', 'elpais.com', 'elperiodico.com', 'elperiodicodearagon.com', 'elperiodicoextremadura.com', 'elperiodicomediterraneo.com', 'expansion.com', 'larioja.com', 'levante-emv.com', 'marca.com', 'politicaexterior.com'])) {//spain/portugal
|
||||
|
||||
if (matchDomain('abc.es')) {
|
||||
let paywall = document.querySelector('.cierre-suscripcion:not([style="display: none;"])');
|
||||
if (window.location.pathname.endsWith('_amp.html')) {
|
||||
amp_unhide_access_hide('="result=\'ALLOW_ACCESS\'"', '', 'amp-ad, amp-embed');
|
||||
premium_banner = document.querySelector('.cierre-suscripcion');
|
||||
removeDOMElement(premium_banner);
|
||||
removeDOMElement(paywall);
|
||||
} else {
|
||||
let amphtml = document.querySelector('link[rel="amphtml"]');
|
||||
if (paywall && amphtml) {
|
||||
removeDOMElement(paywall);
|
||||
window.location.href = amphtml.href;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,5 +42,5 @@
|
||||
"webRequestBlocking",
|
||||
"<all_urls>"
|
||||
],
|
||||
"version": "2.6.4.5"
|
||||
"version": "2.6.4.6"
|
||||
}
|
||||
|
@ -654,5 +654,5 @@
|
||||
"*://*.wsj.net/*",
|
||||
"*://webcache.googleusercontent.com/*"
|
||||
],
|
||||
"version": "2.6.4.5"
|
||||
"version": "2.6.4.6"
|
||||
}
|
||||
|
@ -1,4 +1,11 @@
|
||||
{
|
||||
"ABC.es": {
|
||||
"domain": "abc.es",
|
||||
"allow_cookies": 1,
|
||||
"block_regex": "(\\.evolok\\.net\\/|cdn\\.ampproject\\.org\\/v\\d\\/amp-(access|(sticky-)?ad)-.+\\.js)",
|
||||
"useragent": "googlebot",
|
||||
"amp_redirect": ".cierre-suscripcion:not([style=\"display: none;\"]"
|
||||
},
|
||||
"Aftonbladet": {
|
||||
"domain": "aftonbladet.se",
|
||||
"allow_cookies": 1,
|
||||
|
Loading…
x
Reference in New Issue
Block a user