Fix Scientific American (magazine)

This commit is contained in:
magnolia1234 2022-07-19 08:06:17 +02:00
parent 38b63a760e
commit 48a02c6b03
6 changed files with 12 additions and 6 deletions

View file

@ -134,7 +134,7 @@ Grouped in options:\
[Nautilus](https://nautil.us) - [Nautilus](https://nautil.us) -
[Precision Oncology News](https://www.precisiononcologynews.com) - [Precision Oncology News](https://www.precisiononcologynews.com) -
[Science](https://www.science.org)* - [Science](https://www.science.org)* -
[Scientific American](https://www.scientificamerican.com)* - [Scientific American](https://www.scientificamerican.com) -
[Times Higher Education](https://www.timeshighereducation.com) - [Times Higher Education](https://www.timeshighereducation.com) -
[VentureBeat](https://venturebeat.com) [VentureBeat](https://venturebeat.com)

View file

@ -621,12 +621,13 @@ ext_api.webRequest.onHeadersReceived.addListener(function (details) {
['blocking', 'responseHeaders']); ['blocking', 'responseHeaders']);
// block inline script // block inline script
var block_js_inline = ["*://*.elpais.com/*", "*://*.nautil.us/*", "*://*.theglobeandmail.com/*"]; var block_js_inline = ["*://*.elpais.com/*", "*://*.nautil.us/*", "*://*.scientificamerican.com/*", "*://*.theglobeandmail.com/*"];
if (block_js_inline.length) if (block_js_inline.length)
ext_api.webRequest.onHeadersReceived.addListener(function (details) { ext_api.webRequest.onHeadersReceived.addListener(function (details) {
let url_path = details.url.split('?')[0]; let url_path = details.url.split('?')[0];
let excluded = (matchUrlDomain('elpais.com', details.url) && (url_path.includes('/elpais.com') || !url_path.includes('.html'))) let excluded = (matchUrlDomain('elpais.com', details.url) && (url_path.includes('/elpais.com') || !url_path.includes('.html')))
|| (matchUrlDomain('nautil.us', details.url) && !details.url.match(/((\w)+(\-)+){3,}/)) || (matchUrlDomain('nautil.us', details.url) && !details.url.match(/((\w)+(\-)+){3,}/))
|| (matchUrlDomain('scientificamerican.com', details.url) && !details.url.match(/\.com\/article\//))
|| (matchUrlDomain('theglobeandmail.com', details.url) && (!enabledSites.includes('#options_optin_tgam_premium') || !details.url.includes('?rel=premium'))); || (matchUrlDomain('theglobeandmail.com', details.url) && (!enabledSites.includes('#options_optin_tgam_premium') || !details.url.includes('?rel=premium')));
if (!isSiteEnabled(details) || excluded) if (!isSiteEnabled(details) || excluded)
return; return;

View file

@ -2,6 +2,7 @@
Changelog Bypass Paywalls Clean - Firefox Changelog Bypass Paywalls Clean - Firefox
Post-release Post-release
Fix Scientific American (magazine)
* v2.7.6.0 (2022-07-17) * v2.7.6.0 (2022-07-17)
Add The Japan Times Add The Japan Times

View file

@ -694,5 +694,5 @@
"*://*.wsj.net/*", "*://*.wsj.net/*",
"*://webcache.googleusercontent.com/*" "*://webcache.googleusercontent.com/*"
], ],
"version": "2.7.6.0" "version": "2.7.6.1"
} }

View file

@ -1521,10 +1521,9 @@ var defaultSites = {
domain: "sciencesetavenir.fr", domain: "sciencesetavenir.fr",
block_regex: /(\.poool\.fr\/|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/ block_regex: /(\.poool\.fr\/|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/
}, },
"Scientific American (free articles only)": { "Scientific American": {
domain: "scientificamerican.com", domain: "scientificamerican.com",
allow_cookies: 1, allow_cookies: 1
remove_cookies: 1
}, },
"Seeking Alpha": { "Seeking Alpha": {
domain: "seekingalpha.com", domain: "seekingalpha.com",

View file

@ -66,6 +66,11 @@
"remove_cookies_select_drop": ["counter"], "remove_cookies_select_drop": ["counter"],
"block_regex": "\\.nrc\\.nl\\/paywall-api\\/api\\/zephr" "block_regex": "\\.nrc\\.nl\\/paywall-api\\/api\\/zephr"
}, },
"Scientific American (free articles only)": {
"domain": "scientificamerican.com",
"allow_cookies": 1,
"block_regex": "\\.scientificamerican\\.com\\/core\\/modules\\/.+\\/core_assets\\/js\\/mura\\.min\\.js"
},
"SOFREP": { "SOFREP": {
"domain": "sofrep.com", "domain": "sofrep.com",
"block_regex": "cdn\\.ampproject\\.org\\/v\\d\\/amp-access-.+\\.js", "block_regex": "cdn\\.ampproject\\.org\\/v\\d\\/amp-access-.+\\.js",