diff --git a/background.js b/background.js index 1e7ad68..d4dde5d 100755 --- a/background.js +++ b/background.js @@ -27,6 +27,7 @@ const restrictions = { 'ft.com': /.+\.ft\.com\/content\//, 'lastampa.it': /^((?!\/video\.lastampa\.it\/).)*$/, 'medianama.com': /\.medianama\.com\/((\d){4}\/(\d){2}|wp-content)\//, + 'science.org': /^((?!\.science\.org\/doi\/).)*$/, 'timesofindia.com': /.+\.timesofindia\.com\/($|toi-plus(\/.+)?|.+\.cms)/, 'nknews.org': /^((?!nknews\.org\/pro\/).)*$/, 'quora.com': /^((?!quora\.com\/search\?q=).)*$/, diff --git a/changelog.txt b/changelog.txt index 73fd424..d721895 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,7 @@ Changelog Bypass Paywalls Clean - Chrome Post-release +Fix Handelsblatt (no amp) * v2.5.0.0 (2022-01-02) Add Capital Gazette (local USA) diff --git a/contentScript.js b/contentScript.js index 6f6240b..fec265d 100755 --- a/contentScript.js +++ b/contentScript.js @@ -520,13 +520,13 @@ else if (matchDomain('handelsblatt.com')) { let amp_ads = document.querySelectorAll('amp-ad, amp-embed'); removeDOMElement(...amp_ads); } else { - let paywall = document.querySelector('div.temp-paywall2'); + let paywall = document.querySelector('div.temp-paywall1'); let amphtml = document.querySelector('link[rel="amphtml"]'); - if (!amphtml) - amphtml = {href: url.replace(/\/(www|app)\./, '/amp2.')}; if (paywall && amphtml) { removeDOMElement(paywall); - window.location.href = amphtml.href; + let premium = document.querySelector('meta[content*="PREMIUM"]'); + if (!premium) + window.location.href = amphtml.href; } } } diff --git a/custom/manifest.json b/custom/manifest.json index 1565db2..a1f2aba 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -39,5 +39,5 @@ "webRequestBlocking", "" ], - "version": "2.5.0.0" + "version": "2.5.0.1" } diff --git a/manifest.json b/manifest.json index 115d0f2..2b8f540 100755 --- a/manifest.json +++ b/manifest.json @@ -593,5 +593,5 @@ "*://*.wsj.net/*", "*://*.zephr.com/*" ], - "version": "2.5.0.0" + "version": "2.5.0.1" } diff --git a/sites.js b/sites.js index 5f0cb31..ee3b548 100755 --- a/sites.js +++ b/sites.js @@ -1288,7 +1288,7 @@ var defaultSites = { allow_cookies: 1, block_regex: /cdn\.ampproject\.org\/v\d\/amp-(access|(sticky-)?ad|fx-flying-carpet)-.+\.js/ }, - "Science": { + "Science (free articles only)": { domain: "science.org", allow_cookies: 1 }, diff --git a/sites_updated.json b/sites_updated.json index abac974..ea9a845 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -38,7 +38,7 @@ "allow_cookies": 1, "block_regex": "\\.qiota\\.com\\/" }, - "Science": { + "Science (free articles only)": { "domain": "science.org", "allow_cookies": 1, "cs_code": [{