diff --git a/background.js b/background.js index f5b82cd..a36ae6f 100644 --- a/background.js +++ b/background.js @@ -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'); diff --git a/changelog.txt b/changelog.txt index dea6abf..16c247d 100644 --- a/changelog.txt +++ b/changelog.txt @@ -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) diff --git a/contentScript.js b/contentScript.js index 87b110f..e82e748 100644 --- a/contentScript.js +++ b/contentScript.js @@ -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')) { diff --git a/manifest.json b/manifest.json index 1fb6963..7878d72 100644 --- a/manifest.json +++ b/manifest.json @@ -702,5 +702,5 @@ "*://gcm.omerlocdn.com/*", "*://webcache.googleusercontent.com/*" ], - "version": "2.8.3.3" + "version": "2.8.3.4" } diff --git a/sites.js b/sites.js index 5be4635..480fdb2 100644 --- a/sites.js +++ b/sites.js @@ -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", diff --git a/sites_updated.json b/sites_updated.json index dbc2446..58a3db7 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -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)",