Fix-update The Daily Telegraph (au)

This commit is contained in:
magnolia1234 2021-05-22 19:54:49 +02:00
parent 096e78b44c
commit f6a76ba979
6 changed files with 26 additions and 18 deletions

View file

@ -466,6 +466,7 @@ Grupo Vocento (ABC) regional sites like
[Northern Territory News](https://www.ntnews.com.au) -
[The Advertiser/AdelaideNow](https://www.adelaidenow.com.au) -
[The Australian](https://www.theaustralian.com.au) -
[The Chronicle](https://www.thechronicle.com.au) -
[The Courier-Mail](https://www.couriermail.com.au) -
[The Daily Telegraph](https://www.dailytelegraph.com.au) -
[The Mercury Tasmania](https://www.themercury.com.au) -
@ -506,7 +507,6 @@ Grupo Vocento (ABC) regional sites like
[The Gympie Times](https://www.gympietimes.com.au) -
[The Northern Star](https://www.northernstar.com.au) -
[The Queensland Times](https://www.qt.com.au) -
[Toowoomba Chronicle](https://www.thechronicle.com.au) -
[Warwick Daily News](https://www.warwickdailynews.com.au)
* opt-in to custom sites for unlisted

View file

@ -477,6 +477,7 @@ function add_grouped_sites(init_rules) {
}
for (let domain of au_news_corp_domains) {
allow_cookies.push(domain);
if (domain !== 'dailytelegraph.com.au')
use_google_bot.push(domain);
blockedRegexes[domain] = /cdn\.ampproject\.org\/v\d\/amp-(access|ad|iframe)-.+\.js/;
}
@ -877,6 +878,18 @@ ext_api.webRequest.onBeforeRequest.addListener(function (details) {
["blocking"]
);
// dailytelegraph.com.au amp-redirect
ext_api.webRequest.onBeforeRequest.addListener(function (details) {
if (!isSiteEnabled(details)) {
return;
}
var updatedUrl = decodeURIComponent(details.url.split('&dest=')[1].split('&')[0]).replace('www.', 'amp.');
return { redirectUrl: updatedUrl };
},
{urls:["*://www.dailytelegraph.com.au/subscribe/*"], types:["main_frame"]},
["blocking"]
);
// fix nytimes x-frame-options (hidden iframe content)
ext_api.webRequest.onHeadersReceived.addListener(function (details) {
if (!isSiteEnabled(details)) {

View file

@ -7,6 +7,7 @@ Remove Mitteldeutsche Zeitung (obsolete)
Fix-update National Geographic USA
Fix-update Prensa Iberica
Fix-update Saechsische Zeitung (amp)
Fix-update The Daily Telegraph (au)
Fix-update The Economic Times (mobile/India)
Fix-update Valor Economico (Google webcache)

View file

@ -33,7 +33,7 @@ if (ext_api.runtime && (matchDomain(['belfasttelegraph.co.uk', 'bostonglobe.com'
// Australian Provincial Newspapers
domain = window.location.hostname.replace('www.', '');
let au_apn_script = document.querySelector('script[src^="https://media.apnarm.net.au/"]');
if (au_apn_script || (domain = matchDomain(['news-mail.com.au', 'frasercoastchronicle.com.au', 'gladstoneobserver.com.au', 'dailyexaminer.com.au', 'dailymercury.com.au', 'themorningbulletin.com.au', 'sunshinecoastdaily.com.au', 'gympietimes.com.au', 'northernstar.com.au', 'qt.com.au', 'thechronicle.com.au', 'warwickdailynews.com.au'])))
if (au_apn_script || (domain = matchDomain(['news-mail.com.au', 'frasercoastchronicle.com.au', 'gladstoneobserver.com.au', 'dailyexaminer.com.au', 'dailymercury.com.au', 'themorningbulletin.com.au', 'sunshinecoastdaily.com.au', 'gympietimes.com.au', 'northernstar.com.au', 'qt.com.au', 'warwickdailynews.com.au'])))
if (!cookieExists('subscribed'))
setCookie('subscribed', 'true', domain, '/', 14);
} else {
@ -130,8 +130,8 @@ else {
removeDOMElement(story_generic_iframe, blocker);
} else if (window.location.hostname.endsWith('.com.au')) {
// Australia News Corp
let au_nc_sites = ['adelaidenow.com.au', 'cairnspost.com.au', 'couriermail.com.au', 'dailytelegraph.com.au', 'geelongadvertiser.com.au', 'goldcoastbulletin.com.au', 'heraldsun.com.au', 'ntnews.com.au', 'theaustralian.com.au', 'themercury.com.au', 'townsvillebulletin.com.au', 'weeklytimesnow.com.au'];
if (matchDomain(au_nc_sites)) {
let au_nc_sites = ['adelaidenow.com.au', 'cairnspost.com.au', 'couriermail.com.au', 'dailytelegraph.com.au', 'geelongadvertiser.com.au', 'goldcoastbulletin.com.au', 'heraldsun.com.au', 'ntnews.com.au', 'theaustralian.com.au', 'thechronicle.com.au', 'themercury.com.au', 'townsvillebulletin.com.au', 'weeklytimesnow.com.au'];
if (domain = matchDomain(au_nc_sites)) {
let header_ads = document.querySelector('.header_ads-container');
removeDOMElement(header_ads);
if (window.location.hostname.startsWith('amp.')) {
@ -1592,17 +1592,11 @@ else if (matchDomain('barrons.com')) {
}
});
if (!window.location.href.includes('barrons.com/amp/')) {
var href = '';
let signin_links = document.querySelectorAll('a.primary-button--link');
let signin_links = document.querySelectorAll('a.primary-button--link[href*="target="]');
for (let signin_link of signin_links) {
href = signin_link.href;
if (href.includes('target=')) {
href = href.split('target')[1].split('%3F')[0];
href = href.replace('=', '').replace('%3A', ':').replace(/%2F/g, '/');
signin_link.href = href;
signin_link.href = decodeURIComponent(signin_link.href.split('target=')[1]).split('?')[0];
signin_link.text = 'Click';
}
}
let barrons_ads = document.querySelectorAll('.barrons-body-ad-placement');
removeDOMElement(...barrons_ads);
} else {

View file

@ -300,7 +300,6 @@
"*://*.modernhealthcare.com/*",
"*://*.morgenpost.de/*",
"*://*.mv-voice.com/*",
"*://*.natgeofe.com/*",
"*://*.nation.africa/*",
"*://*.nationalgeographic.com/*",
"*://*.nationalpost.com/*",
@ -508,6 +507,7 @@
"*://*.jsdelivr.net/*",
"*://*.lightboxcdn.com/*",
"*://*.loader-cdn.azureedge.net/*",
"*://*.natgeofe.com/*",
"*://*.nyt.com/*",
"*://*.pasedigital.cl/*",
"*://*.rcsobjects.it/*",
@ -517,5 +517,5 @@
"*://*.wallkit.net/*",
"*://*.wsj.net/*"
],
"version": "2.2.1.7"
"version": "2.2.1.8"
}

View file

@ -320,8 +320,8 @@ var defaultSites =
}
const au_comm_media_domains = ['bendigoadvertiser.com.au', 'bordermail.com.au', 'canberratimes.com.au', 'centralwesterndaily.com.au', 'dailyadvertiser.com.au', 'dailyliberal.com.au', 'examiner.com.au', 'illawarramercury.com.au', 'newcastleherald.com.au', 'northerndailyleader.com.au', 'portnews.com.au', 'standard.net.au', 'theadvocate.com.au', 'thecourier.com.au', 'westernadvocate.com.au'];
const au_news_corp_domains = ['adelaidenow.com.au', 'cairnspost.com.au', 'couriermail.com.au', 'dailytelegraph.com.au', 'geelongadvertiser.com.au', 'goldcoastbulletin.com.au', 'heraldsun.com.au', 'ntnews.com.au', 'theaustralian.com.au', 'themercury.com.au', 'townsvillebulletin.com.au', 'weeklytimesnow.com.au'];
const au_prov_news_domains = ['news-mail.com.au', 'frasercoastchronicle.com.au', 'gladstoneobserver.com.au', 'dailyexaminer.com.au', 'dailymercury.com.au', 'themorningbulletin.com.au', 'sunshinecoastdaily.com.au', 'gympietimes.com.au', 'northernstar.com.au', 'qt.com.au', 'thechronicle.com.au', 'warwickdailynews.com.au'];
const au_news_corp_domains = ['adelaidenow.com.au', 'cairnspost.com.au', 'couriermail.com.au', 'dailytelegraph.com.au', 'geelongadvertiser.com.au', 'goldcoastbulletin.com.au', 'heraldsun.com.au', 'ntnews.com.au', 'theaustralian.com.au', 'thechronicle.com.au', 'themercury.com.au', 'townsvillebulletin.com.au', 'weeklytimesnow.com.au'];
const au_prov_news_domains = ['news-mail.com.au', 'frasercoastchronicle.com.au', 'gladstoneobserver.com.au', 'dailyexaminer.com.au', 'dailymercury.com.au', 'themorningbulletin.com.au', 'sunshinecoastdaily.com.au', 'gympietimes.com.au', 'northernstar.com.au', 'qt.com.au', 'warwickdailynews.com.au'];
const ca_torstar_domains = ['niagarafallsreview.ca', 'stcatharinesstandard.ca', 'thepeterboroughexaminer.com', 'therecord.com', 'thespec.com', 'thestar.com', 'wellandtribune.ca'];
const de_funke_media_domains = ['abendblatt.de', 'braunschweiger-zeitung.de', 'morgenpost.de', 'nrz.de', 'otz.de', 'thueringer-allgemeine.de', 'tlz.de', 'waz.de', 'wp.de', 'wr.de'];
const de_madsack_domains = ['haz.de', 'kn-online.de', 'ln-online.de', 'lvz.de', 'maz-online.de', 'neuepresse.de', 'ostsee-zeitung.de'];