Fix Telegraaf.nl

merge-requests/7/head
magnolia1234 2 years ago
parent 46deedf08c
commit 85e3873659

@ -578,6 +578,18 @@ ext_api.webRequest.onBeforeRequest.addListener(function (details) {
["blocking"] ["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 // Australia News Corp redirect subscribe to amp
var au_news_corp_subscr = au_news_corp_domains.map(domain => '*://www.' + domain + '/subscribe/*'); var au_news_corp_subscr = au_news_corp_domains.map(domain => '*://www.' + domain + '/subscribe/*');
ext_api.webRequest.onBeforeRequest.addListener(function (details) { ext_api.webRequest.onBeforeRequest.addListener(function (details) {

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

@ -1904,7 +1904,7 @@ else if (matchDomain('telegraaf.nl')) {
removeDOMElement(spotx_banner, paywall); removeDOMElement(spotx_banner, paywall);
let premium = document.querySelector('.PremiumLabelWithLine'); let premium = document.querySelector('.PremiumLabelWithLine');
let article_id = article_wrapper ? article_wrapper.innerText : '123'; 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) { if (premium && !article_body_done) {
let article_body_old = document.querySelector('[id^="articleBody"]'); let article_body_old = document.querySelector('[id^="articleBody"]');
removeDOMElement(article_body_old); removeDOMElement(article_body_old);
@ -1922,7 +1922,7 @@ else if (matchDomain('telegraaf.nl')) {
let intro = document.querySelector('span[id^="articleIntro"]'); let intro = document.querySelector('span[id^="articleIntro"]');
if (intro) if (intro)
json_text = json_text.replace(intro.innerText + '\n\n', ''); 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) { if (article_body) {
let div_main = document.createElement('div'); let div_main = document.createElement('div');
div_main.setAttribute('id', 'articleBody' + article_id); div_main.setAttribute('id', 'articleBody' + article_id);
@ -3067,7 +3067,7 @@ else if (matchDomain('nybooks.com')) {
let paywall_article = document.querySelector('.paywall-article'); let paywall_article = document.querySelector('.paywall-article');
if (paywall_article) if (paywall_article)
paywall_article.classList.remove('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); removeDOMElement(banner);
} }

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

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

Loading…
Cancel
Save