Fix Australian Community Media (identify on url)

This commit is contained in:
magnolia1234 2022-12-02 17:33:00 +01:00
parent d164dfa52a
commit 8b76c50824
6 changed files with 17 additions and 6 deletions

View file

@ -101,7 +101,7 @@ _* free articles only._
[Entrepreneur](https://www.entrepreneur.com) -
[Forbes](https://www.forbes.com) -
[Fortune](https://fortune.com) -
[Harvard Business Review](https://www.hbr.org)* -
[Harvard Business Review](https://www.hbr.org) -
[Inc.com](https://www.inc.com) -
[Law.com](https://www.law.com)* -
[Law360](https://www.law360.com)* -

View file

@ -910,7 +910,7 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) {
let url_hostname = urlHost(details.url);
if (header_referer_hostname.match(/\.(com|net)\.au$/)) {
// block Piano.io for regional Australian Community Media sites (opt-in to custom sites)
var au_comm_media_domain = (details.url.startsWith('https://' + header_referer_hostname + '/promotions/website_content_esov/') && ['xmlhttprequest'].includes(details.type) && !matchUrlDomain(au_comm_media_domains, header_referer) && enabledSites.includes('###_au_comm_media'));
var au_comm_media_domain = (details.url.match(/\.au\/story\/(\d){7,}/) && ['main_frame'].includes(details.type) && !matchUrlDomain(au_comm_media_domains, header_referer) && enabledSites.includes('###_au_comm_media'));
if (au_comm_media_domain)
au_comm_media_domains = customAddRules(au_comm_media_domains, {allow_cookies: 1}, blockedRegexes['canberratimes.com.au']);
else if (header_referer_hostname.endsWith('.com.au')) {

View file

@ -7,6 +7,7 @@ Add Sueddeutsche Zeitung (link to archive.is)
Add Welt.de (link to archive.is)
Remove BusinessPost.ie (fix obsolete)
Remove Philonomist (fix obsolete)
Fix Australian Community Media (identify on url)
Fix Groupe Centre France (text)
* v2.9.5.0 (2022-11-27)
@ -1494,7 +1495,7 @@ Include sites from local js-file (maintenance)
Update Options - new release check
* v1.6.4.4 (2020-02-20)
Add Australian Community Media daily newspapers
Add Australian Community Media (daily)
Add Clarin (Argentina)
Add WAtoday (Australia)
Fix TheNation paywall-script block

View file

@ -3084,6 +3084,16 @@ else if (matchDomain('harpers.org')) {
else if (matchDomain('hbr.org')) {
let popup = document.querySelector('.persistent-banner');
removeDOMElement(popup);
let paywall = document.querySelector('site-paywall');
if (paywall) {//legacy
removeDOMElement(paywall);
let intro = document.querySelector('.article-ideainbrief');
if (intro)
intro.removeAttribute('class');
let main_hidden = document.querySelector('div#main[style]');
if (main_hidden)
main_hidden.removeAttribute('style');
}
}
else if (matchDomain('hbrchina.org')) {

View file

@ -732,5 +732,5 @@
"*://gcm.omerlocdn.com/*",
"*://webcache.googleusercontent.com/*"
],
"version": "2.9.5.4"
"version": "2.9.5.5"
}

View file

@ -167,7 +167,7 @@ var defaultSites = {
"westernadvocate.com.au"
],
allow_cookies: 1,
block_regex: /(cdn-au\.piano\.io\/api\/tinypass.+\.js|cdn\.cxense\.com\/)/
block_regex: /(\.piano\.io\/|cdn\.cxense\.com\/)/
},
"Australia Nine Entertainment": {
domain: "###_au_nine_ent",
@ -828,7 +828,7 @@ var defaultSites = {
"Harper's Magazine": {
domain: "harpers.org"
},
"Harvard Business Review (free articles only)": {
"Harvard Business Review": {
domain: "hbr.org",
block_regex: /(\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/
},