mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 03:41:57 +01:00
Fix Scientific American (cookies)
This commit is contained in:
parent
d257aa22e9
commit
e55687bced
3 changed files with 3 additions and 8 deletions
|
@ -619,13 +619,12 @@ ext_api.webRequest.onHeadersReceived.addListener(function (details) {
|
|||
['blocking', 'responseHeaders']);
|
||||
|
||||
// block inline script
|
||||
var block_js_inline = ["*://*.elpais.com/*", "*://*.nautil.us/*", "*://*.scientificamerican.com/*", "*://*.theglobeandmail.com/*"];
|
||||
var block_js_inline = ["*://*.elpais.com/*", "*://*.nautil.us/*", "*://*.theglobeandmail.com/*"];
|
||||
if (block_js_inline.length)
|
||||
ext_api.webRequest.onHeadersReceived.addListener(function (details) {
|
||||
let url_path = details.url.split('?')[0];
|
||||
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('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')));
|
||||
if (!isSiteEnabled(details) || excluded)
|
||||
return;
|
||||
|
|
3
sites.js
3
sites.js
|
@ -1523,7 +1523,8 @@ var defaultSites = {
|
|||
},
|
||||
"Scientific American": {
|
||||
domain: "scientificamerican.com",
|
||||
allow_cookies: 1
|
||||
allow_cookies: 1,
|
||||
remove_cookies: 1
|
||||
},
|
||||
"Seeking Alpha": {
|
||||
domain: "seekingalpha.com",
|
||||
|
|
|
@ -27,11 +27,6 @@
|
|||
"remove_cookies_select_drop": ["counter"],
|
||||
"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"
|
||||
},
|
||||
"The Japan Times": {
|
||||
"domain": "japantimes.co.jp",
|
||||
"block_regex": "cdn\\.cxense\\.com\\/",
|
||||
|
|
Loading…
Reference in a new issue