Add Foreign Affairs

This commit is contained in:
magnolia1234 2020-10-21 19:54:10 +02:00
parent 81d46fc21e
commit ab605cf816
6 changed files with 15 additions and 1 deletions

View file

@ -21,6 +21,7 @@ So don't update to Firefox 79 or use Firefox Nightly (and load BPC from a custom
##### World news
[First Things](https://www.firstthings.com) -
[Foreign Affairs](https://www.foreignaffairs.com) -
[Foreign Policy](https://www.foreignpolicy.com) -
[Harper's Magazine](https://harpers.org) -
[Inkl](https://www.inkl.com) -

View file

@ -188,6 +188,7 @@ var blockedRegexes = {
'exame.abril.com.br': /.+\.tinypass\.com\/.+/,
'folha.uol.com.br': /.+\.folha\.uol\.com\.br\/paywall\/js\/.+\/publicidade\.ads\.js/,
'globo.com': /.+\.tinypass\.com\/.+/,
'foreignaffairs.com': /.+\.foreignaffairs\.com\/sites\/default\/files\/js\/js_P9zr.+\.js/,
'foreignpolicy.com': /.+\.tinypass\.com\/.+/,
'fortune.com': /.+\.tinypass\.com\/.+/,
'ftm.nl': /.+\.ftm\.nl\/js\/routing\?/,

View file

@ -2,6 +2,7 @@
Changelog Bypass Paywalls Clean - Firefox
Post-release
Add Foreign Affairs
Add Il Resto del Carlino (Italy)
Add The Logic (Canada)
Add The New York Review of Books

View file

@ -1383,6 +1383,15 @@ else if (matchDomain("thelogic.co")) {
removeDOMElement(article_subscribe);
}
else if (matchDomain("foreignaffairs.com")) {
let paywall = document.querySelector('.paywall');
let loading_indicator = document.querySelector('.loading-indicator');
removeDOMElement(paywall, loading_indicator);
let article_dropcap = document.querySelectorAll('.article-dropcap');
for (let elem of article_dropcap)
elem.classList.add('loaded');
}
// General Functions
function removeDOMElement(...elements) {
for (let element of elements) {

View file

@ -107,6 +107,7 @@
"*://*.firstthings.com/*",
"*://*.fnlondon.com/*",
"*://*.folha.uol.com.br/*",
"*://*.foreignaffairs.com/*",
"*://*.foreignpolicy.com/*",
"*://*.fortune.com/*",
"*://*.frasercoastchronicle.com.au/*",
@ -332,5 +333,5 @@
"webRequest",
"webRequestBlocking"
],
"version": "1.9.1.4"
"version": "1.9.1.5"
}

View file

@ -55,6 +55,7 @@ var defaultSites =
"First Things": "firstthings.com",
"Folha de S. Paulo": "folha.uol.com.br",
"Follow the Money (ftm.nl)": "ftm.nl",
"Foreign Affairs": "foreignaffairs.com",
"Foreign Policy": "foreignpolicy.com",
"Fortune": "fortune.com",
"Frankfurter Allgemeine Zeitung": "faz.net",