Fix Newcastle Herald (+ new domain)

This commit is contained in:
magnolia1234 2020-01-05 16:48:54 +01:00 committed by GitHub
parent b15228663c
commit 703d24a22d
5 changed files with 20 additions and 6 deletions

View file

@ -52,6 +52,7 @@
[New Statesman](https://www.newstatesman.com)\
[New York Magazine](https://www.nymag.com)\
[New Zealand Herald](https://www.nzherald.co.nz)\
[Newcastle Herald](https://www.newcastleherald.com.au)\
[Nikkei Asian Review](https://asia.nikkei.com)\
[NK News](https://www.nknews.org)\
[NRC](https://www.nrc.nl)\
@ -76,7 +77,6 @@
[The Business Journals](https://www.bizjournals.com)\
[The Diplomat](https://www.thediplomat.com)\
[The Globe and Mail](https://www.theglobeandmail.com)\
[The Herald](https://www.theherald.com.au)\
[The Hindu](https://www.thehindu.com)\
[The Japan Times](https://www.japantimes.co.jp)\
[TheMarker](https://www.themarker.com)\

View file

@ -48,10 +48,13 @@ var defaultSites = {
'National Post': 'nationalpost.com',
'New Statesman': 'newstatesman.com',
'New York Magazine': 'nymag.com',
'New Zealand Herald': 'nzherald.co.nz',
'Newscastle Herald': 'newcastleherald.com.au',
'Nikkei Asian Review': 'asia.nikkei.com',
'NK News': 'nknews.org',
'NRC': 'nrc.nl',
'New Zealand Herald': 'nzherald.co.nz',
'Newcastle Herald': 'newcastleherald.com.au',
'Orange County Register': 'ocregister.com',
'Orlando Sentinel': 'orlandosentinel.com',
'Palo Alto Online': 'paloaltoonline.com',
@ -256,7 +259,8 @@ const blockedRegexes = {
'bostonglobe.com': /meter\.bostonglobe\.com\/js\/.+/,
'foreignpolicy.com': /.+\.tinypass\.com\/.+/,
'inquirer.com': /.+\.tinypass\.com\/.+/,
'spectator.co.uk': /.+\.tinypass\.com\/.+/
'spectator.co.uk': /.+\.tinypass\.com\/.+/,
'newcastleherald.com.au': /.+cdn-au\.piano\.io\/api\/tinypass.+\.js/
};
const userAgentDesktop = "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"

View file

@ -238,6 +238,16 @@ if (window.location.href.indexOf("techinasia.com") !== -1) {
removeDOMElement(splash_subscribe, paywall_hard);
}
if (window.location.href.indexOf("newcastleherald.com.au") !== -1) {
const subscribe_truncate = document.querySelector('.subscribe-truncate');
if (subscribe_truncate)
subscribe_truncate.classList.remove('subscribe-truncate');
const subscriber_hider = document.querySelectorAll('.subscriber-hider');
for (let i = 0; i < subscriber_hider.length; i++) {
subscriber_hider[i].classList.remove('subscriber-hider');
}
}
function removeDOMElement(...elements) {
for (let element of elements) {
if (element) element.remove();

View file

@ -26,7 +26,8 @@
"*://*.leparisien.fr/*",
"*://*.nrc.nl/*",
"*://*.theathletic.com/*",
"*://*.techinasia.com/*"
"*://*.techinasia.com/*",
"*://*.newcastleherald.com.au/*"
],
"js": ["contentScript.js"]
}
@ -117,7 +118,7 @@
"*://*.bostonglobe.com/*",
"*://*.bizjournals.com/*",
"*://*.theglobeandmail.com/*",
"*://*.theherald.com.au/*",
"*://*.newcastleherald.com.au/*",
"*://*.japantimes.co.jp/*",
"*://*.themarker.com/*",
"*://*.mercurynews.com/*",
@ -166,4 +167,3 @@
],
"version": "1.6.3"
}

View file

@ -47,6 +47,7 @@ var defaultSites = {
'New Statesman (javascript disabled)': 'newstatesman.com',
'New York Magazine': 'nymag.com',
'New Zealand Herald': 'nzherald.co.nz',
'Newcastle Herald': 'newcastleherald.com.au',
'Nikkei Asian Review': 'asia.nikkei.com',
'NK News': 'nknews.org',
'NRC': 'nrc.nl',
@ -71,7 +72,6 @@ var defaultSites = {
'The Business Journals': 'bizjournals.com',
'The Diplomat': 'thediplomat.com',
'The Globe and Mail (javascript disabled)': 'theglobeandmail.com',
'The Herald': 'theherald.com.au',
'The Hindu': 'thehindu.com',
'The Japan Times': 'japantimes.co.jp',
'TheMarker': 'themarker.com',