diff --git a/background.js b/background.js index 4890ef3..f61b214 100644 --- a/background.js +++ b/background.js @@ -197,7 +197,7 @@ var blockedRegexes = { 'mercuriovalpo.cl': /(.+\.mercuriovalpo\.cl\/impresa\/wp-content\/themes\/papel-digital-2019-desktop\/assets\/(vendor|\d)\.js|pram\.pasedigital\.cl\/API\/User\/Status\?)/, 'modernhealthcare.com': /.+\.tinypass\.com\/.+/, 'nationalgeographic.com': /.+\.blueconic\.net\/.+/, -'nationalreview.com': /.+\.blueconic\.net\/.+/, +'nationalreview.com': /(.+\.blueconic\.net\/.+|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/, 'newrepublic.com': /.+\.onecount\.net\/js\/.+/, 'newsweek.com': /.+\.googletagmanager\.com\/gtm\.js/, 'newyorker.com': /.+\.newyorker\.com\/verso\/static\/presenter-articles.+\.js/, diff --git a/contentScript.js b/contentScript.js index 490fea8..59de822 100644 --- a/contentScript.js +++ b/contentScript.js @@ -1087,6 +1087,21 @@ else if (domain = matchDomain("businesstimes.com.sg")) { cx_custom.setAttribute('style', 'display:none'); } +else if (matchDomain("nationalreview.com")) { + document.addEventListener('DOMContentLoaded', () => { + let url = window.location.href; + let article_truncated = document.querySelector('div#article-content-truncate-wrap'); + window.setTimeout(function () { + if (article_truncated && !url.includes('/amp/')) { + if (url.includes('?')) + window.location.href = url.replace('?', 'amp/?') + else + window.location.href = url + 'amp'; + } + }, 500); // Delay (in milliseconds) + }); +} + // General Functions function removeDOMElement(...elements) { for (let element of elements) { diff --git a/lp/manifest.json b/lp/manifest.json index 83fb5bf..03e5ff6 100644 --- a/lp/manifest.json +++ b/lp/manifest.json @@ -309,5 +309,5 @@ "webRequest", "webRequestBlocking" ], - "version": "1.8.7.0" + "version": "1.8.7.1" } \ No newline at end of file diff --git a/manifest.json b/manifest.json index 4acd1e7..1faeccf 100644 --- a/manifest.json +++ b/manifest.json @@ -40,5 +40,5 @@ "webRequest", "webRequestBlocking" ], - "version": "1.8.7.0" + "version": "1.8.7.1" } \ No newline at end of file diff --git a/optin/opt-in.html b/optin/opt-in.html index 3aee92d..4035217 100644 --- a/optin/opt-in.html +++ b/optin/opt-in.html @@ -16,7 +16,7 @@ Boston Globe Irish Independent The Belfast Telegraph
-+
SetCookie opt-in enabled: