Fix amp: allow amp-consent

This commit is contained in:
magnolia1234 2022-01-09 17:28:17 +01:00
parent 4e39f20be1
commit 4eb1f17b6c
7 changed files with 35 additions and 30 deletions

View file

@ -212,7 +212,7 @@ Grouped in options:\
[The Indianapolis Star](https://www.indystar.com) -
[The Record (North Jersey)](https://www.northjersey.com) -
[The Tennessean](http://www.tennessean.com)\
*Hearst Communications* sites like (opt-in to custom sites for unlisted)\
*Hearst Communications (newspapers)* sites like (opt-in to custom sites for unlisted)\
[Houston Chronicle](https://www.houstonchronicle.com) -
[San Antonio Express-News](https://www.expressnews.com) -
[San Francisco Chronicle](https://www.sfchronicle.com)\

View file

@ -6,6 +6,7 @@ Add group Hearst Communications (local USA)
Fix Bloomberg (timing)
Fix Handelsblatt (no amp)
Fix The Indian Express (premium)
Fix amp: allow amp-consent
Fix trimmed referer (restrictions)
* v2.5.0.0 (2022-01-02)

View file

@ -30,7 +30,7 @@ var usa_mng_domains = ['denverpost.com', 'eastbaytimes.com', 'mercurynews.com'
var usa_tribune_domains = ['baltimoresun.com', 'chicagotribune.com', 'courant.com', 'dailypress.com', 'mcall.com', 'nydailynews.com', 'orlandosentinel.com', 'pilotonline.com', 'sun-sentinel.com'];
// clean local storage of sites (with an exemption for hold-list)
var arr_localstorage_hold = ['allgaeuer-zeitung.de', 'augsburger-allgemeine.de', 'businessoffashion.com', 'charliehebdo.fr', 'cmjornal.pt', 'fortune.com', 'ilfoglio.it', 'inc42.com', 'kurier.at', 'nknews.org', 'seekingalpha.com', 'thehindu.com', 'thetimes.co.uk'].concat(de_funke_media_domains, es_grupo_vocento_domains, es_unidad_domains, fr_groupe_ebra_domains, fr_groupe_la_depeche_domains, fr_groupe_nice_matin_domains, no_nhst_media_domains, usa_hearst_comm_domains);
var arr_localstorage_hold = ['aachener-nachrichten.de', 'aachener-zeitung.de', 'allgaeuer-zeitung.de', 'augsburger-allgemeine.de', 'barrons.com', 'businessoffashion.com', 'charliehebdo.fr', 'cmjornal.pt', 'corriere.it', 'elespanol.com', 'estadao.com.br', 'fortune.com', 'ilfoglio.it', 'inc42.com', 'kurier.at', 'nknews.org', 'ruhrnachrichten.de', 'scmp.com', 'seekingalpha.com', 'telegraph.co.uk', 'thehindu.com', 'thetimes.co.uk', 'wsj.com'].concat(de_funke_media_domains, es_grupo_vocento_domains, es_unidad_domains, fr_groupe_ebra_domains, fr_groupe_la_depeche_domains, fr_groupe_nice_matin_domains, it_quotidiano_domains, no_nhst_media_domains, usa_hearst_comm_domains);
if (!matchDomain(arr_localstorage_hold)) {
window.localStorage.clear();
}
@ -1223,6 +1223,11 @@ else if (matchDomain('lesinrocks.com')) {
}
}
else if (matchDomain('lexpress.fr')) {
let ads = document.querySelectorAll('div.block_pub, div.bottom-bar-full');
removeDOMElement(...ads);
}
else if (matchDomain('loeildelaphotographie.com')) {
let paywall = document.querySelector('.paywall');
if (paywall) {
@ -1745,6 +1750,9 @@ else if (matchDomain('telegraph.co.uk')) {
let truncated_content = document.querySelector('.truncated-content');
removeDOMElement(...paywall, truncated_content);
amp_unhide_access_hide('="c.result=\'ALLOW_ACCESS\'"', '', 'amp-ad, amp-embed', false);
} else {
let amp_ads = document.querySelectorAll('amp-ad, amp-embed');
removeDOMElement(...amp_ads);
}
} else {
let subwall = document.querySelectorAll('[class^="subwall"]');
@ -1852,7 +1860,7 @@ else if (matchDomain('elmercurio.com')) {
else if (matchDomain('estadao.com.br')) {
if (window.location.pathname.endsWith('.amp')) {
amp_unhide_access_hide('="granted"', '="NOT granted"');
amp_unhide_access_hide('="granted"', '="NOT granted"', 'amp-ad, amp-embed, amp-fx-flying-carpet');
} else {
let paywall = document.getElementById('paywall-wrapper-iframe-estadao');
removeDOMElement(paywall);
@ -2600,7 +2608,7 @@ else if (matchDomain('nationalreview.com')) {
window.location.href = url + 'amp';
}
}
let adverts = document.querySelectorAll('amp-ad, .ad-unit--center');
let adverts = document.querySelectorAll('amp-ad, .ad-unit--center, amp-connatix-player');
removeDOMElement(...adverts);
}

View file

@ -182,6 +182,11 @@
"domain": "thecourier.co.uk",
"useragent": "googlebot"
},
"Theepochtimes.com": {
"allow_cookies": 1,
"block_regex": "subs\\.youmaker\\.com",
"domain": "theepochtimes.com"
},
"Thehill.com": {
"allow_cookies": 1,
"block_regex": "\\.tinypass\\.com\\/",

View file

@ -606,5 +606,5 @@
"*://*.wsj.net/*",
"*://*.zephr.com/*"
],
"version": "2.5.0.5"
"version": "2.5.0.6"
}

View file

@ -6,12 +6,12 @@ var defaultSites = {
"Aachener Nachrichten": {
domain: "aachener-nachrichten.de",
allow_cookies: 1,
block_regex: /cdn\.ampproject\.org\/v\d\/amp-(ad|analytics|consent|subscriptions)-.+\.js/
block_regex: /cdn\.ampproject\.org\/v\d\/amp-((sticky-)?ad|analytics|subscriptions)-.+\.js/
},
"Aachener Zeitung": {
domain: "aachener-zeitung.de",
allow_cookies: 1,
block_regex: /cdn\.ampproject\.org\/v\d\/amp-(ad|analytics|consent|subscriptions)-.+\.js/
block_regex: /cdn\.ampproject\.org\/v\d\/amp-((sticky-)?ad|analytics|subscriptions)-.+\.js/
},
"ABC.es": {
domain: "abc.es",
@ -163,7 +163,7 @@ var defaultSites = {
},
"Barron's": {
domain: "barrons.com",
block_regex: /(cdn\.cxense\.com\/.+|cdn\.ampproject\.org\/v\d\/amp-(access|ad|consent|subscriptions)-.+\.js)/,
block_regex: /(cdn\.cxense\.com\/.+|cdn\.ampproject\.org\/v\d\/amp-(access|ad|subscriptions)-.+\.js)/,
remove_cookies_select_hold: ["wsjregion"],
useragent: "googlebot"
},
@ -174,7 +174,7 @@ var defaultSites = {
"Belfast Telegraph (opt-in)": {
domain: "belfasttelegraph.co.uk",
allow_cookies: 1,
block_regex: /(cdn\.flip-pay\.com\/clients\/inm\/flip-pay\.js|cdn\.ampproject\.org\/v\d\/amp-(access|ad|consent)-.+\.js)/
block_regex: /(cdn\.flip-pay\.com\/clients\/inm\/flip-pay\.js)/
},
"Berliner Zeitung": {
domain: "berliner-zeitung.de",
@ -254,7 +254,7 @@ var defaultSites = {
"Corriere della Sera": {
domain: "corriere.it",
allow_cookies: 1,
block_regex: /(\.tinypass\.com\/|\.corriereobjects\.it\/.+\/js\/_paywall\.sjs|cdn\.ampproject\.org\/v\d\/amp-(ad|consent|subscriptions)-.+\.js)/
block_regex: /(\.tinypass\.com\/|\.corriereobjects\.it\/.+\/js\/_paywall\.sjs|cdn\.ampproject\.org\/v\d\/amp-(ad|subscriptions)-.+\.js)/
},
"Crain Communications": {
domain: "###_usa_craincomm",
@ -358,7 +358,7 @@ var defaultSites = {
"El Español": {
domain: "elespanol.com",
allow_cookies: 1,
block_regex: /(\.eestatic\.com\/assets_js\/web\/v\d\/historia.*\.min\.js|cdn\.ampproject\.org\/v\d\/amp-(access|(sticky-)?ad|consent|subscriptions)-.+\.js)/
block_regex: /(\.eestatic\.com\/assets_js\/web\/v\d\/historia.*\.min\.js|cdn\.ampproject\.org\/v\d\/amp-(access|(sticky-)?ad|subscriptions)-.+\.js)/
},
"El Espectador": {
domain: "elespectador.com",
@ -689,7 +689,7 @@ var defaultSites = {
"Harvard Business Review Taiwan": {
domain: "hbrtaiwan.com"
},
"Hearst Communications": {
"Hearst Communications (newspapers)": {
domain: "###_usa_hearst_comm",
group: [
"expressnews.com",
@ -765,7 +765,7 @@ var defaultSites = {
"Irish Independent (opt-in)": {
domain: "independent.ie",
allow_cookies: 1,
block_regex: /(cdn\.flip-pay\.com\/clients\/inm\/flip-pay\.js|cdn\.ampproject\.org\/v\d\/amp-(access|ad|consent)-.+\.js)/
block_regex: /(cdn\.flip-pay\.com\/clients\/inm\/flip-pay\.js)/
},
"Italian.tech": {
domain: "italian.tech",
@ -1089,7 +1089,7 @@ var defaultSites = {
"National Review": {
domain: "nationalreview.com",
allow_cookies: 1,
block_regex: /(\.blueconic\.net\/|\.nationalreview\.com\/script\.js|cdn\.ampproject\.org\/v\d\/amp-(access|ad)-.+\.js)/,
block_regex: /(\.blueconic\.net\/|\.nationalreview\.com\/script\.js|cdn\.ampproject\.org\/v\d\/amp-(access|(sticky-)?ad)-.+\.js)/,
useragent: "googlebot"
},
"Nautilus": {
@ -1172,7 +1172,7 @@ var defaultSites = {
},
"O Estado de S. Paulo": {
domain: "estadao.com.br",
block_regex: /(acesso\.estadao\.com\.br\/paywall\/.+\/.+\.js|cdn\.ampproject\.org\/v\d\/amp-(access|ad|consent|fx-flying-carpet)-.+\.js)/
block_regex: /(acesso\.estadao\.com\.br\/paywall\/.+\/.+\.js|cdn\.ampproject\.org\/v\d\/amp-(access|ad|fx-flying-carpet)-.+\.js)/
},
"O Globo (& Valor Econômico)": {
domain: "globo.com",
@ -1239,7 +1239,7 @@ var defaultSites = {
"quotidiano.net"
],
allow_cookies: 1,
block_regex: /(cdn\.cxense\.com\/|\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|(sticky-)?ad|consent|fx-flying-carpet)-.+\.js)/
block_regex: /(cdn\.cxense\.com\/|\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|(sticky-)?ad|fx-flying-carpet)-.+\.js)/
},
"Reuters": {
domain: "reuters.com",
@ -1259,7 +1259,7 @@ var defaultSites = {
"Ruhr Nachrichten": {
domain: "ruhrnachrichten.de",
allow_cookies: 1,
block_regex: /(\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-((sticky-)?ad|consent|subscriptions)-.+\.(m)?js)/,
block_regex: /(\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-(ad|subscriptions)-.+\.(m)?js)/,
useragent: "googlebot"
},
"San Diego Union Tribune": {
@ -1322,7 +1322,7 @@ var defaultSites = {
},
"South China Morning Post": {
domain: "scmp.com",
block_regex: /(\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|ad|analytics|consent|fx-flying-carpet)-.+\.js)/
block_regex: /(\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|ad|analytics|fx-flying-carpet)-.+\.js)/
},
"Southern Weekly": {
domain: "infzm.com",
@ -1590,7 +1590,7 @@ var defaultSites = {
},
"The Telegraph": {
domain: "telegraph.co.uk",
block_regex: /(\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|ad|consent)-.+\.js|\.telegraph\.co\.uk\/.+\/piano.+\.js|assets\.adobedtm\.com\/.+\.js)/
block_regex: /(\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|ad)-.+\.js|\.telegraph\.co\.uk\/.+\/piano.+\.js|assets\.adobedtm\.com\/.+\.js)/
},
"The Times": {
domain: "thetimes.co.uk",
@ -1616,7 +1616,7 @@ var defaultSites = {
},
"The Wall Street Journal": {
domain: "wsj.com",
block_regex: /(cdn\.cxense\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|ad|consent|subscriptions)-.+\.js)/,
block_regex: /(cdn\.cxense\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|ad|subscriptions)-.+\.js)/,
remove_cookies_select_hold: ["wsjregion", "ResponsiveConditional_initialBreakpoint"],
useragent: "googlebot"
},
@ -1760,7 +1760,7 @@ var defaultSites = {
"###_gr_es_unidad_domains": {
group_rule_domains: ["elmundo.es", "expansion.com", "marca.com"],
allow_cookies: 1,
block_regex: /cdn\.ampproject\.org\/v\d\/amp-(access|(sticky-)?ad|consent|subscriptions)-.+\.js/
block_regex: /cdn\.ampproject\.org\/v\d\/amp-(access|(sticky-)?ad|subscriptions)-.+\.js/
},
"###_gr_it_repubblica_domains": {
group_rule_domains: ["gelocal.it", "ilsecoloxix.it", "italian.tech", "lanuovasardegna.it", "lastampa.it", "lescienze.it", "limesonline.com", "repubblica.it"],

View file

@ -15,15 +15,6 @@
}
]
},
"Hearst Communications": {
"domain": "###_usa_hearst_comm",
"group": [
"expressnews.com",
"houstonchronicle.com",
"sfchronicle.com"
],
"block_regex": "(\\.blueconic\\.net\\/|cdn\\.ampproject\\.org\\/v\\d\\/amp-(access|(sticky-)?ad)-.+\\.js)"
},
"Il Foglio": {
"domain": "ilfoglio.it",
"allow_cookies": 1,