Fix Telegraaf.nl

master
magnolia1234 2022-05-23 19:31:27 +02:00
parent 2f02ceae8b
commit f89868b802
6 changed files with 18 additions and 10 deletions

View File

@ -578,6 +578,18 @@ ext_api.webRequest.onBeforeRequest.addListener(function (details) {
["blocking"]
);
// telegraaf.nl redirect error-page
ext_api.webRequest.onBeforeRequest.addListener(function (details) {
if (!isSiteEnabled(details)) {
return;
}
let updatedUrl = details.url.split('&')[0].replace('error?ref=/', '');;
return { redirectUrl: updatedUrl };
},
{urls:["*://www.telegraaf.nl/error?ref=/*"], types:["main_frame"]},
["blocking"]
);
// Australia News Corp redirect subscribe to amp
var au_news_corp_subscr = au_news_corp_domains.map(domain => '*://www.' + domain + '/subscribe/*');
ext_api.webRequest.onBeforeRequest.addListener(function (details) {

View File

@ -2,6 +2,7 @@
Changelog Bypass Paywalls Clean - Chrome
Post-release
Fix Telegraaf.nl
* v2.7.0.0 (2022-05-22)
Add group ARA.cat

View File

@ -1904,7 +1904,7 @@ else if (matchDomain('telegraaf.nl')) {
removeDOMElement(spotx_banner, paywall);
let premium = document.querySelector('.PremiumLabelWithLine');
let article_id = article_wrapper ? article_wrapper.innerText : '123';
let article_body_done = document.querySelector('#articleBody' + article_id);
let article_body_done = window.location.pathname.startsWith('/video/') || document.querySelector('#articleBody' + article_id);
if (premium && !article_body_done) {
let article_body_old = document.querySelector('[id^="articleBody"]');
removeDOMElement(article_body_old);
@ -1922,7 +1922,7 @@ else if (matchDomain('telegraaf.nl')) {
let intro = document.querySelector('span[id^="articleIntro"]');
if (intro)
json_text = json_text.replace(intro.innerText + '\n\n', '');
let article_body = document.querySelector('section.TextArticlePage__bodyContent');
let article_body = document.querySelector('section[data-element="articleBody"]');
if (article_body) {
let div_main = document.createElement('div');
div_main.setAttribute('id', 'articleBody' + article_id);
@ -3067,7 +3067,7 @@ else if (matchDomain('nybooks.com')) {
let paywall_article = document.querySelector('.paywall-article');
if (paywall_article)
paywall_article.classList.remove('paywall-article');
let banner = document.querySelector('div.toast-cta');
let banner = document.querySelector('div.toast-cta, div.inline-ad');
removeDOMElement(banner);
}

View File

@ -42,5 +42,5 @@
"webRequestBlocking",
"<all_urls>"
],
"version": "2.7.0.0"
"version": "2.7.0.1"
}

View File

@ -5,11 +5,6 @@
"domain": "abqjournal.com",
"useragent": "googlebot"
},
"Ara.cat": {
"allow_cookies": 1,
"domain": "ara.cat",
"useragent": "googlebot"
},
"Bauernzeitung.ch": {
"allow_cookies": 1,
"domain": "bauernzeitung.ch",

View File

@ -666,5 +666,5 @@
"*://*.wsj.net/*",
"*://webcache.googleusercontent.com/*"
],
"version": "2.7.0.0"
"version": "2.7.0.1"
}