Fix-update Foreign Affairs

This commit is contained in:
magnolia1234 2020-12-16 18:38:05 +01:00
parent 4e78be92e3
commit c4cd2a3cfb
4 changed files with 21 additions and 2 deletions

View file

@ -17,6 +17,7 @@ const restrictions = {
'bloombergquint.com': /^((?!\.bloombergquint\.com\/bq-blue-exclusive\/).)*$/,
'elcomercio.pe': /.+\/elcomercio\.pe\/.+((\w)+(\-)+){3,}.+/,
'faz.net': /^((?!\/zeitung\.faz\.net\/).)*$/,
'foreignaffairs.com': /.+\.foreignaffairs\.com\/(articles|fa-caching|interviews|reviews|sites)\/.+/,
'ft.com': /.+\.ft.com\/content\//,
'gestion.pe': /.+\/gestion\.pe\/.+((\w)+(\-)+){3,}.+/,
'hs.fi': /^((?!\/.+\.hs\.fi\/paivanlehti\/).)*$/,
@ -207,7 +208,7 @@ var blockedRegexes = {
'exame.abril.com.br': /cdn\.tinypass\.com\/.+/,
'financialpost.com': /cdn\.tinypass\.com\/.+/,
'folha.uol.com.br': /(.+\.folha\.uol\.com\.br\/paywall\/js\/.+\/publicidade\.ads\.js|paywall\.folha\.uol\.com\.br\/.+|js\.matheranalytics\.com\/.+)/,
'foreignaffairs.com': /.+\.foreignaffairs\.com\/sites\/default\/files\/js\/js_P9zr.+\.js/,
'foreignaffairs.com': /.+\.foreignaffairs\.com\/sites\/default\/files\/js\/js_[^y].+\.js/,
'foreignpolicy.com': /cdn\.tinypass\.com\/.+/,
'fortune.com': /cdn\.tinypass\.com\/.+/,
'fresnobee.com': /cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js/,

View file

@ -2,6 +2,7 @@
Changelog Bypass Paywalls Clean - Firefox
Post-release
Fix-update Foreign Affairs
Fix-update Tech in Asia (homepage)
Fix show update (amo-version)

View file

@ -1462,6 +1462,23 @@ else if (matchDomain("foreignaffairs.com")) {
let article_dropcap = document.querySelectorAll('.article-dropcap');
for (let elem of article_dropcap)
elem.classList.add('loaded');
let hidden_images = document.querySelectorAll('img[src^="data:image/"]');
for (let hidden_image of hidden_images) {
var data_src = hidden_image.getAttribute("data-src");
if (data_src) {
hidden_image.setAttribute('src', data_src);
hidden_image.removeAttribute('class');
}
}
if (window.location.href.includes('/interviews/')) {
let img_header = document.querySelector('.interview-header > div');
if (img_header) {
let img_src = img_header.getAttribute("data-src");
let img_elem = document.createElement('img');
img_elem.src = img_src;
img_header.appendChild(img_elem);
}
}
}
else if (matchDomain("kurier.at")) {

View file

@ -408,5 +408,5 @@
"*://*.repstatic.it/*",
"*://*.userzoom.com/*"
],
"version": "1.9.9.1"
"version": "1.9.9.2"
}