Fix-update Telegraaf.nl (FF meta-refresh)

This commit is contained in:
magnolia1234 2020-04-05 08:33:24 +02:00 committed by GitHub
parent 598772a45e
commit a00b6f9afb

View file

@ -32,7 +32,7 @@ else if (matchDomain("thesaturdaypaper.com.au")) {
} }
else if (matchDomain('rep.repubblica.it')) { else if (matchDomain('rep.repubblica.it')) {
setTimeout(function () { window.setTimeout(function () {
if (window.location.href.includes('/pwa/')) { if (window.location.href.includes('/pwa/')) {
window.location.href = window.location.href.replace('/pwa/', '/ws/detail/'); window.location.href = window.location.href.replace('/pwa/', '/ws/detail/');
} }
@ -57,6 +57,12 @@ else if (matchDomain('telegraaf.nl')) {
if (window.location.href.startsWith('https://www.telegraaf.nl/error?ref=/')) { if (window.location.href.startsWith('https://www.telegraaf.nl/error?ref=/')) {
window.location.href = window.location.href.split('&')[0].replace('error?ref=/', ''); window.location.href = window.location.href.split('&')[0].replace('error?ref=/', '');
} }
let refresh = document.querySelector('div[id="content"] > meta[http-equiv="refresh"]');
if (refresh) {
window.setTimeout(function () {
window.location.reload(true);
}, 500);
}
let article_wrapper = document.querySelector('.ArticlePageWrapper__uid'); let article_wrapper = document.querySelector('.ArticlePageWrapper__uid');
let spotx_banner = document.querySelector('.ArticleBodyBlocks__inlineArticleSpotXBanner'); let spotx_banner = document.querySelector('.ArticleBodyBlocks__inlineArticleSpotXBanner');
let paywall = document.querySelector('.PopupBackdrop__block'); let paywall = document.querySelector('.PopupBackdrop__block');
@ -100,7 +106,7 @@ else if (matchDomain("washingtonpost.com")) {
const free_button = document.querySelector('.gdpr-consent-container .continue-btn.button.free'); const free_button = document.querySelector('.gdpr-consent-container .continue-btn.button.free');
if (free_button) if (free_button)
free_button.click(); free_button.click();
setTimeout(function () { window.setTimeout(function () {
const gdprcheckbox = document.querySelector('.gdpr-consent-container .consent-page:not(.hide) #agree'); const gdprcheckbox = document.querySelector('.gdpr-consent-container .consent-page:not(.hide) #agree');
if (gdprcheckbox) { if (gdprcheckbox) {
gdprcheckbox.checked = true; gdprcheckbox.checked = true;
@ -238,7 +244,7 @@ else if (matchDomain("economist.com")) {
const advert = document.querySelector('.advert'); const advert = document.querySelector('.advert');
const wrapper = document.getElementById('bottom-page-wrapper'); const wrapper = document.getElementById('bottom-page-wrapper');
removeDOMElement(subscribe, advert, wrapper); removeDOMElement(subscribe, advert, wrapper);
setTimeout(function () { window.setTimeout(function () {
const paywall = document.querySelector('.layout-article-regwall'); ; const paywall = document.querySelector('.layout-article-regwall'); ;
if (paywall) { if (paywall) {
window.location.reload(true); window.location.reload(true);