Fix-update sites Nine Entertainment (Australia)

Brisbane Times, Sydney Morning Herald & WAtoday
This commit is contained in:
magnolia1234 2020-09-11 18:07:02 +02:00
parent d60adee60e
commit a32800cd57
2 changed files with 5 additions and 2 deletions

View file

@ -144,6 +144,7 @@ var blockedRegexes = {
'bizjournals.com': /(assets\.bizjournals\.com\/static\/js\/app\/cxense\.js|cdn\.cxense\.com)/, 'bizjournals.com': /(assets\.bizjournals\.com\/static\/js\/app\/cxense\.js|cdn\.cxense\.com)/,
'bloomberg.com': /.+\.tinypass\.com\/.+/, 'bloomberg.com': /.+\.tinypass\.com\/.+/,
'bostonglobe.com': /meter\.bostonglobe\.com\/js\/.+/, 'bostonglobe.com': /meter\.bostonglobe\.com\/js\/.+/,
'brisbanetimes.com.au': /cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js/,
'businessinsider.com': /.+\.tinypass\.com\/.+/, 'businessinsider.com': /.+\.tinypass\.com\/.+/,
'challenges.fr': /.+\.poool\.fr\/.+/, 'challenges.fr': /.+\.poool\.fr\/.+/,
'charliehebdo.fr': /.+\.poool\.fr\/.+/, 'charliehebdo.fr': /.+\.poool\.fr\/.+/,
@ -205,6 +206,7 @@ var blockedRegexes = {
'scmp.com': /.+\.tinypass\.com\/.+/, 'scmp.com': /.+\.tinypass\.com\/.+/,
'sfchronicle.com': /.+\.blueconic\.net\/.+/, 'sfchronicle.com': /.+\.blueconic\.net\/.+/,
'sloanreview.mit.edu': /(.+\.tinypass\.com\/.+|.+\.netdna-ssl\.com\/wp-content\/themes\/smr\/assets\/js\/libs\/welcome-ad\.js)/, 'sloanreview.mit.edu': /(.+\.tinypass\.com\/.+|.+\.netdna-ssl\.com\/wp-content\/themes\/smr\/assets\/js\/libs\/welcome-ad\.js)/,
'smh.com.au': /cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js/,
'spectator.co.uk': /.+\.tinypass\.com\/.+/, 'spectator.co.uk': /.+\.tinypass\.com\/.+/,
'spectator.com.au': /.+\.tinypass\.com\/.+/, 'spectator.com.au': /.+\.tinypass\.com\/.+/,
'technologyreview.com': /.+\.blueconic\.net\/.+/, 'technologyreview.com': /.+\.blueconic\.net\/.+/,
@ -215,6 +217,7 @@ var blockedRegexes = {
'thenation.com': /.+\.tinypass\.com\/.+/, 'thenation.com': /.+\.tinypass\.com\/.+/,
'valeursactuelles.com': /.+\.qiota\.com\/.+/, 'valeursactuelles.com': /.+\.qiota\.com\/.+/,
'washingtonpost.com': /.+\.washingtonpost\.com\/dr\/resources\/dist\/washpost\/pwapi-proxy\.min\.js/, 'washingtonpost.com': /.+\.washingtonpost\.com\/dr\/resources\/dist\/washpost\/pwapi-proxy\.min\.js/,
'watoday.com.au': /cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js/,
'wsj.com': /(cdn\.ampproject\.org\/v\d\/amp-access-.+\.js|cdn\.cxense\.com)/ 'wsj.com': /(cdn\.ampproject\.org\/v\d\/amp-access-.+\.js|cdn\.cxense\.com)/
}; };

View file

@ -40,14 +40,14 @@ if (matchDomain("thesaturdaypaper.com.au")) {
removeDOMElement(paywall); removeDOMElement(paywall);
} }
else if (matchDomain(["theage.com.au"])) { else if (domain = matchDomain(["brisbanetimes.com.au", "smh.com.au", "theage.com.au", "watoday.com.au"])) {
let url = window.location.href; let url = window.location.href;
let for_subscribers = document.querySelector('meta[content^="FOR SUBSCRIBERS"]'); let for_subscribers = document.querySelector('meta[content^="FOR SUBSCRIBERS"]');
if (for_subscribers) { if (for_subscribers) {
window.setTimeout(function () { window.setTimeout(function () {
window.location.href = url.replace('www.', 'amp.'); window.location.href = url.replace('www.', 'amp.');
}, 500); // Delay (in milliseconds) }, 500); // Delay (in milliseconds)
} else if (url.includes('amp.theage.com.au')) { } else if (url.includes('amp.' + domain)) {
let subscr_sections = document.querySelectorAll('div[subscriptions-section="content"]'); let subscr_sections = document.querySelectorAll('div[subscriptions-section="content"]');
for (let subscr_section of subscr_sections) { for (let subscr_section of subscr_sections) {
subscr_section.removeAttribute('subscriptions-section'); subscr_section.removeAttribute('subscriptions-section');