From 0c62ab161b9f7645855f5aa7440904b48cb05d64 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Sun, 17 Sep 2023 08:05:44 +0200 Subject: [PATCH] Add The News Minute (India) --- README.md | 1 + changelog.txt | 1 + contentScript.js | 21 ++++++++++++++++ custom/manifest.json | 2 +- manifest.json | 3 ++- sites.js | 4 +++ sites_updated.json | 58 +++++--------------------------------------- 7 files changed, 36 insertions(+), 54 deletions(-) diff --git a/README.md b/README.md index 52b72545..906b4196 100644 --- a/README.md +++ b/README.md @@ -890,6 +890,7 @@ Grouped in options:\ [The Hindu](https://www.thehindu.com) - [The Hindu BusinessLine](https://www.thehindubusinessline.com) - [The Indian Express](https://indianexpress.com) - +[The News Minute](https://www.thenewsminute.com) - [The Quint](https://www.thequint.com) - [Times of India](https://timesofindia.indiatimes.com) diff --git a/changelog.txt b/changelog.txt index 1ff2e61a..6cefdf40 100644 --- a/changelog.txt +++ b/changelog.txt @@ -4,6 +4,7 @@ Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywal Post-release Add Cambio Colombia +Add The News Minute (India) Fix LaStampa.it (video articles) Fix South China Morning Post (mobile & amp) Fix WSJ (disable amp-redirect for www) diff --git a/contentScript.js b/contentScript.js index adc78f81..29b6f054 100644 --- a/contentScript.js +++ b/contentScript.js @@ -5066,6 +5066,27 @@ else if (matchDomain('thenewatlantis.com')) { article_gated.classList.remove('article-gated'); } +else if (matchDomain('thenewsminute.com')) { + let paywall = document.querySelector('div#paywall-banner'); + if (paywall) { + removeDOMElement(paywall); + let json_script = getArticleJsonScript(); + if (json_script) { + let json = JSON.parse(json_script.text); + if (json) { + let json_text = breakText(parseHtmlEntities(json.articleBody.replace(/\.\./g, '.\r\n\r\n'))); + let article = document.querySelector('div.arr--story-page-card-wrapper'); + if (json_text && article) { + article.innerHTML = ''; + let article_new = document.createElement('p'); + article_new.innerText = json_text; + article.appendChild(article_new); + } + } + } + } +} + else if (matchDomain('thepointmag.com')) { let overlay = document.querySelectorAll('div.overlay, div#tpopup-'); removeDOMElement(...overlay); diff --git a/custom/manifest.json b/custom/manifest.json index 05346325..18db3f86 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -51,5 +51,5 @@ "webRequestBlocking", "*://*/*" ], - "version": "3.3.3.5" + "version": "3.3.3.6" } diff --git a/manifest.json b/manifest.json index 8f5ef93a..f9e94276 100644 --- a/manifest.json +++ b/manifest.json @@ -666,6 +666,7 @@ "*://*.thenation.com/*", "*://*.thenewatlantis.com/*", "*://*.theneweuropean.co.uk/*", + "*://*.thenewsminute.com/*", "*://*.thepeterboroughexaminer.com/*", "*://*.thepointmag.com/*", "*://*.theprovince.com/*", @@ -793,5 +794,5 @@ "*://*.wyleex.com/*", "*://webcache.googleusercontent.com/*" ], - "version": "3.3.3.5" + "version": "3.3.3.6" } diff --git a/sites.js b/sites.js index fdba7c9f..9496e5fc 100644 --- a/sites.js +++ b/sites.js @@ -2258,6 +2258,10 @@ var defaultSites = { block_regex: /(\.nytimes\.com\/meter\.js|mwcm\.nyt\.com\/.+\.js|cooking\.nytimes\.com\/api\/.+\/access)/, useragent: "googlebot" }, + "The News Minute": { + domain: "thenewsminute.com", + allow_cookies: 1 + }, "The Philadelphia Inquirer": { domain: "inquirer.com", allow_cookies: 1, diff --git a/sites_updated.json b/sites_updated.json index 2187c9e5..f1040ed7 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -5,38 +5,19 @@ "block_regex": "\\.automobilwoche\\.de\\/sites\\/camw\\/files\\/js\\/js_wB7.+\\.js", "upd_version": "3.3.2.8" }, - "Beleggersbelangen.nl": { - "domain": "beleggersbelangen.nl", - "allow_cookies": 1, - "block_regex": "(\\.beleggersbelangen\\.nl\\/script\\.js|\\.blueconic\\.net\\/)", - "cs_code": "[{\"cond\":\"div.unlimited-access\", \"rm_elem\": 1, \"elems\":[{\"cond\":\"div.no-account\", \"rm_class\": \"no-account\"}, {\"cond\":\"div.content-inner[style]\", \"rm_attrib\": \"style\"}]}]", - "upd_version": "3.3.1.8" - }, - "Bild der Wissenschaft": { - "domain": "wissenschaft.de", - "allow_cookies": 1, - "useragent": "googlebot", - "upd_version": "3.3.1.7" - }, "Bloomberg": { "domain": "bloomberg.com", "allow_cookies": 1, "block_regex": "(\\.cm\\.bloomberg\\.com\\/|assets\\.bwbx\\.io\\/s\\d\\/javelin\\/.+\\/transporter\\/)", "upd_version": "3.2.7.1" }, - "BQ Prime": { - "domain": "bqprime.com", - "allow_cookies": 1, - "block_js_inline": "\\.bqprime\\.com\\/.+\\/.+\\?rel=geo_block", - "block_regex": "(\\.tinypass\\.com\\/api\\/tinypass\\.min\\.js|cdn\\.ampproject\\.org\\/v\\d\\/amp-subscriptions-.+\\.js)", - "upd_version": "3.3.1.7" - }, "Cambio Colombia": { "domain": "cambiocolombia.com", "allow_cookies": 1, "amp_redirect": "div#require-access", "amp_unhide": 1, - "block_regex": "cdn\\.ampproject\\.org\\/v\\d\\/amp-subscriptions-.+\\.js" + "block_regex": "cdn\\.ampproject\\.org\\/v\\d\\/amp-subscriptions-.+\\.js", + "upd_version": "3.3.3.2" }, "De Tijd": { "domain": "tijd.be", @@ -44,13 +25,6 @@ "cs_code": "[{\"cond\":\"body.js-overflow-hidden\", \"rm_class\":\"js-overflow-hidden\"}, {\"cond\":\"[inert]\", \"rm_attrib\": \"inert\"}, {\"cond\":\"div[data-id='react-paywall-investor']\", \"rm_elem\": 1}]", "upd_version": "3.3.2.8" }, - "Fortune": { - "domain": "fortune.com", - "allow_cookies": 1, - "block_regex": "(\\.tinypass\\.com\\/|cdn\\.ampproject\\.org\\/v\\d\\/amp-access-.+\\.js)", - "cs_code": "[{\"cond\":\"div.paywallActive\", \"rm_attrib\":\"class\"}]", - "upd_version": "3.3.1.5" - }, "Inc42": { "domain": "inc42.com", "allow_cookies": 1, @@ -70,13 +44,6 @@ "amp_redirect": "div#cx-snippet", "upd_version": "3.3.2.6" }, - "Nikkei Asian Review": { - "domain": "asia.nikkei.com", - "allow_cookies": 1, - "block_regex": "\\.piano\\.io\\/api\\/piano\\.js", - "ld_google_webcache": "div#paywall-offer|div#article-body-preview", - "upd_version": "3.3.1.5" - }, "Pour la Science.fr": { "domain": "pourlascience.fr", "allow_cookies": 1, @@ -90,19 +57,6 @@ "cs_block": 1, "upd_version": "3.3.2.3" }, - "Revista Oeste": { - "domain": "revistaoeste.com", - "allow_cookies": 1, - "block_regex": "\\/revistaoeste\\.com\\/wp-content\\/.+\\/js\\/app\\..+\\.js", - "cs_code": "[{\"cond\":\"div.hidden[data-url]\", \"rm_class\":\"hidden\", \"elems\":[{\"cond\":\"div.is-locked\", \"rm_elem\": 1}, {\"cond\":\"div.subscribe-panel\", \"rm_elem\": 1}]}, {\"cond\":\"div.expandable\", \"rm_class\":\"expandable\"}]", - "upd_version": "3.3.1.5" - }, - "Scientific American": { - "domain": "scientificamerican.com", - "allow_cookies": 1, - "block_regex": "\\.scientificamerican\\.com\\/api\\/tinypass\\.min\\.js", - "upd_version": "3.3.1.4" - }, "South China Morning Post": { "domain": "scmp.com", "block_regex": "(\\.tinypass\\.com\\/|cdn\\.ampproject\\.org\\/v\\d\\/amp-(access|subscriptions)-.+\\.js)", @@ -145,11 +99,11 @@ "useragent": "googlebot", "upd_version": "3.1.4.0" }, - "The Scientist (archive)": { - "domain": "the-scientist.com", + "The News Minute": { + "domain": "thenewsminute.com", "allow_cookies": 1, - "cs_code": "[{\"cond\":\"div.paywall\", \"rm_class\":\"paywall\", \"elems\":[{\"cond\":\"div.gated-fader\", \"rm_elem\": 1}, {\"cond\":\"div#Modal\", \"rm_elem\": 1}]}]", - "upd_version": "3.3.1.8" + "ld_json": "div#paywall-banner|div.arr--story-page-card-wrapper", + "upd_version": "3.3.3.6" }, "The Wrap": { "domain": "thewrap.com",