Fix-update The Daily Telegraph (au)

master
magnolia1234 2021-05-22 19:52:16 +02:00
parent 370ceb32e7
commit 099f3166c8
7 changed files with 27 additions and 19 deletions

View File

@ -500,6 +500,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) -
@ -540,7 +541,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,7 +477,8 @@ function add_grouped_sites(init_rules) {
}
for (let domain of au_news_corp_domains) {
allow_cookies.push(domain);
use_google_bot.push(domain);
if (domain !== 'dailytelegraph.com.au')
use_google_bot.push(domain);
blockedRegexes[domain] = /cdn\.ampproject\.org\/v\d\/amp-(access|ad|iframe)-.+\.js/;
}
for (let domain of au_prov_news_domains) {
@ -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,16 +1592,10 @@ 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.text = 'Click';
}
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);

View File

@ -30,5 +30,5 @@
"webRequestBlocking",
"<all_urls>"
],
"version": "2.2.1.7"
"version": "2.2.1.8"
}

View File

@ -288,7 +288,6 @@
"*://*.modernhealthcare.com/*",
"*://*.morgenpost.de/*",
"*://*.mv-voice.com/*",
"*://*.natgeofe.com/*",
"*://*.nation.africa/*",
"*://*.nationalgeographic.com/*",
"*://*.nationalpost.com/*",
@ -496,6 +495,7 @@
"*://*.jsdelivr.net/*",
"*://*.lightboxcdn.com/*",
"*://*.loader-cdn.azureedge.net/*",
"*://*.natgeofe.com/*",
"*://*.nyt.com/*",
"*://*.pasedigital.cl/*",
"*://*.rcsobjects.it/*",
@ -505,5 +505,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'];