Fix foreignpolicy.com

This commit is contained in:
Adam 2021-06-24 22:04:41 -07:00
parent ccafc3d5b6
commit 167d1420d3
3 changed files with 12 additions and 4 deletions

View File

@ -71,7 +71,8 @@
"*://*.sueddeutsche.de/*",
"*://*.elmundo.es/*",
"*://*.time.com/*",
"*://*.expansion.com/*"
"*://*.expansion.com/*",
"*://*.foreignpolicy.com/*"
],
"js": ["src/js/contentScript.js"]
}

View File

@ -209,7 +209,7 @@ const blockedRegexes = {
'chicagotribune.com': /.+:\/\/.+\.tribdss\.com\//,
'economist.com': /(.+\.tinypass\.com\/.+|economist\.com\/engassets\/_next\/static\/chunks\/framework.+\.js)/,
'editorialedomani.it': /(js\.pelcro\.com\/.+|editorialedomani.it\/pelcro\.js)/,
'foreignpolicy.com': /.+\.tinypass\.com\/.+/,
'foreignpolicy.com': /(cdn\.cxense\.com\/|\.tinypass\.com\/)/,
'fortune.com': /.+\.tinypass\.com\/.+/,
'haaretz.co.il': /haaretz\.co\.il\/htz\/js\/inter\.js/,
'haaretz.com': /haaretz\.com\/hdc\/web\/js\/minified\/header-scripts-int.js.+/,

View File

@ -649,11 +649,18 @@ if (matchDomain('elmercurio.com')) {
if (paywall) {
removeDOMElement(paywall);
} else if (incognitoWall) {
removeDOMElement(incognitoWall);
}
removeDOMElement(incognitoWall);
}
if (paywall || incognitoWall) {
document.body.removeAttribute('style');
}
} else if (matchDomain('foreignpolicy.com')) {
const contentUngated = document.querySelector('div.content-ungated');
removeDOMElement(contentUngated);
const contentGated = document.querySelector('div.content-gated');
if (contentGated) {
contentGated.classList.remove('content-gated');
}
}
function matchDomain (domains) {