diff --git a/background.js b/background.js index 271735a..36879c1 100755 --- a/background.js +++ b/background.js @@ -1361,6 +1361,8 @@ function remove_cookies_fn(domainVar, exclusions = false) { currentWindow: true }, function (tabs) { if (tabs && tabs[0] && tabs[0].url.startsWith('http')) { + if (ext_api.runtime.lastError) + return; let tabId = tabs[0].id; let storeId = '0'; for (let store of cookieStores) { diff --git a/changelog.txt b/changelog.txt index 3e418a6..d375e29 100644 --- a/changelog.txt +++ b/changelog.txt @@ -4,6 +4,7 @@ Changelog Bypass Paywalls Clean - Chrome Post-release Remove The Northern Star (obsolete) Fix-update Boston Globe (no opt-in) +Fix-update Foreign Policy Fix-update The Spectator UK (amp) * v2.2.5.0 (2021-06-13) diff --git a/contentScript.js b/contentScript.js index a3c0d9f..1be2669 100755 --- a/contentScript.js +++ b/contentScript.js @@ -1863,11 +1863,11 @@ else if (matchDomain('foreignaffairs.com')) { } else if (matchDomain('foreignpolicy.com')) { - let placeholder = document.querySelector('div.loading-placeholder-smaller'); - removeDOMElement(placeholder); - let sub_content = document.querySelector('div.sub_content:not(style)'); - if (sub_content) - sub_content.setAttribute('style', 'display:block !important;'); + let content_ungated = document.querySelector('div.content-ungated'); + removeDOMElement(content_ungated); + let content_gated = document.querySelector('div.content-gated'); + if (content_gated) + content_gated.classList.remove('content-gated'); } else if (matchDomain('ft.com')) { diff --git a/custom/manifest.json b/custom/manifest.json index 1d03268..557b257 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -30,5 +30,5 @@ "webRequestBlocking", "" ], - "version": "2.2.5.2" + "version": "2.2.5.3" } \ No newline at end of file diff --git a/manifest.json b/manifest.json index 4092006..a254412 100755 --- a/manifest.json +++ b/manifest.json @@ -513,5 +513,5 @@ "*://*.wallkit.net/*", "*://*.wsj.net/*" ], - "version": "2.2.5.2" + "version": "2.2.5.3" } \ No newline at end of file