diff --git a/background.js b/background.js index e2273e9..c3af18f 100644 --- a/background.js +++ b/background.js @@ -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/, diff --git a/changelog.txt b/changelog.txt index 23bd71c..cdd6d16 100644 --- a/changelog.txt +++ b/changelog.txt @@ -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) diff --git a/contentScript.js b/contentScript.js index 17163dd..1c811ab 100644 --- a/contentScript.js +++ b/contentScript.js @@ -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")) { diff --git a/manifest.json b/manifest.json index 391697c..07271af 100644 --- a/manifest.json +++ b/manifest.json @@ -408,5 +408,5 @@ "*://*.repstatic.it/*", "*://*.userzoom.com/*" ], - "version": "1.9.9.1" + "version": "1.9.9.2" } \ No newline at end of file