Fix Berliner Zeitung

This commit is contained in:
magnolia1234 2022-09-10 09:54:59 +02:00
parent e1578f8f24
commit 2328a5fab7
6 changed files with 10 additions and 16 deletions

View file

@ -914,7 +914,6 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) {
usa_mng_domains = customAddRules(usa_mng_domains, '', blockedRegexes['denverpost.com']);
else if (header_referer_hostname.match(/\.com$/)) {
// set googlebot-useragent for PEI Media sites
//https://www.secondariesinvestor.com/wp-content/plugins/pragmatic-pei-rebranding/assets/img/si-logo.svg
var usa_pei_domain = (details.url.match(/\.com\/wp-content\/plugins\/pragmatic-pei-rebranding\/assets\/img\/.+-logo\.svg$/) && ['image', 'xmlhttprequest'].includes(details.type) && details.url.includes(header_referer_hostname) && !matchUrlDomain(usa_pei_domains, header_referer) && enabledSites.includes('###_usa_pei'));
if (usa_pei_domain)
usa_pei_domains = customAddRules(usa_pei_domains, {allow_cookies: 1}, '', 'googlebot');

View file

@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Firefox
Post-release
Add PEI Media sites (opt-in to custom sites)
Fix Berliner Zeitung
Fix Faz.net (Zeitung timing)
Fix TownNews sites (css)
Update badge (notification: import as custom site)

View file

@ -483,19 +483,8 @@ else if (matchDomain('automobilwoche.de')) {
}
else if (matchDomain('berliner-zeitung.de')) {
let url = window.location.href;
let paywall = document.querySelector('.paywall-dialog-box');
if (url.split('?')[0].includes('.amp')) {
if (paywall) {
removeDOMElement(paywall);
amp_unhide_subscr_section('amp-ad, amp-embed, amp-fx-flying-carpet, div.amp-flying-carpet-text-border');
}
} else {
if (paywall) {
removeDOMElement(paywall);
window.location.href = url.split('?')[0] + '.amp';
}
}
let ads = document.querySelectorAll('[id^="traffective-ad"], [class^="ad-slot_wrapper"], [class^="outbrain_container"]');
removeDOMElement(...ads);
}
else if (matchDomain('cicero.de')) {

View file

@ -702,5 +702,5 @@
"*://gcm.omerlocdn.com/*",
"*://webcache.googleusercontent.com/*"
],
"version": "2.8.3.3"
"version": "2.8.3.4"
}

View file

@ -197,7 +197,7 @@ var defaultSites = {
"Berliner Zeitung": {
domain: "berliner-zeitung.de",
allow_cookies: 1,
block_regex: /cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js/
useragent: "googlebot"
},
"Berlingske": {
domain: "berlingske.dk",

View file

@ -31,6 +31,11 @@
"block_regex": "\\.qiota\\.com\\/",
"new_site": 1
},
"Berliner Zeitung": {
"domain": "berliner-zeitung.de",
"allow_cookies": 1,
"useragent": "googlebot"
},
"L'Opinion": {
"domain": "lopinion.fr",
"block_regex": "(\\.poool\\.fr\\/|cdn\\.ampproject\\.org\\/v\\d\\/amp-access-.+\\.js)",