mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 03:31:57 +01:00
Fix Telegraaf.nl
This commit is contained in:
parent
46deedf08c
commit
85e3873659
5 changed files with 17 additions and 9 deletions
|
@ -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) {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
Changelog Bypass Paywalls Clean - Firefox
|
||||
|
||||
Post-release
|
||||
Fix Telegraaf.nl
|
||||
|
||||
* v2.7.0.0 (2022-05-22)
|
||||
Add group ARA.cat
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -678,5 +678,5 @@
|
|||
"*://*.wsj.net/*",
|
||||
"*://webcache.googleusercontent.com/*"
|
||||
],
|
||||
"version": "2.7.0.0"
|
||||
"version": "2.7.0.1"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue