diff --git a/README.md b/README.md index 911af5e3..83739692 100644 --- a/README.md +++ b/README.md @@ -358,6 +358,7 @@ Grouped in options:\ [Handelsblatt](https://www.handelsblatt.com)* - [Krautreporter.de](https://krautreporter.de) - [Kurier.at](https://kurier.at) - +[Mitteldeutsche Zeitung](https://www.mz.de) - [Neue Osnabrücker Zeitung](https://www.noz.de]) - [Nordwest Zeitung](https://www.nwzonline.de) - [Piqd.de](https://www.piqd.de) - diff --git a/changelog.txt b/changelog.txt index c2ff25e9..04bc8fe5 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,7 @@ Changelog Bypass Paywalls Clean - Firefox Post-release +Add Mitteldeutsche Zeitung Fix Lee Enterprises Group Fix LesEchos.fr (json) Fix WaPo (images) diff --git a/contentScript.js b/contentScript.js index ce4aa05e..4042cfde 100644 --- a/contentScript.js +++ b/contentScript.js @@ -514,6 +514,26 @@ else if (matchDomain('kurier.at')) { plus_content.classList.remove('plusContent'); } +else if (matchDomain('mz.de')) { + let url = window.location.href.split('?')[0]; + let paywall = document.querySelector('.fp-paywall'); + if (url.includes('/amp/')) { + let preview = document.querySelector('section[subscriptions-section="content-not-granted"]'); + removeDOMElement(preview); + let subscr_section = document.querySelector('[subscriptions-section="content"]'); + if (subscr_section) { + subscr_section.removeAttribute('subscriptions-section'); + let amp_ads = document.querySelectorAll('amp-ad, amp-embed'); + removeDOMElement(...amp_ads); + } + } else { + if (paywall) { + removeDOMElement(paywall); + window.location.href = window.location.href.replace('.de/', '.de/amp/'); + } + } +} + else if (matchDomain(['noz.de', 'nwzonline.de', 'shz.de', 'svz.de'])) { let url = window.location.href; if (url.includes('?amp') || url.includes('-amp.html')) { diff --git a/manifest.json b/manifest.json index 962aa662..337ce0f0 100644 --- a/manifest.json +++ b/manifest.json @@ -333,6 +333,7 @@ "*://*.modernhealthcare.com/*", "*://*.morgenpost.de/*", "*://*.mv-voice.com/*", + "*://*.mz.de/*", "*://*.nation.africa/*", "*://*.nationalgeographic.com/*", "*://*.nationalpost.com/*", diff --git a/sites.js b/sites.js index ea4d0401..692f501d 100644 --- a/sites.js +++ b/sites.js @@ -952,6 +952,11 @@ var defaultSites = { domain: "technologyreview.com", block_regex: /\.blueconic\.net\// }, + "Mitteldeutsche Zeitung": { + domain: "mz.de", + allow_cookies: 1, + block_regex: /cdn\.ampproject\.org\/v\d\/amp-(access|(sticky-)?ad|subscriptions)-.+\.js/ + }, "Mountain View Voice": { domain: "mv-voice.com" }, @@ -1732,4 +1737,4 @@ expandSiteRules(defaultSites); // grouped domains (dompurify) var nl_mediahuis_region_domains = grouped_sites['###_nl_mediahuis_region']; var no_nhst_media_domains = grouped_sites['###_no_nhst_media']; -var usa_theathletic_domains = grouped_sites['###_usa_theathletic']; \ No newline at end of file +var usa_theathletic_domains = grouped_sites['###_usa_theathletic'];