From 660432de17dfa6dcea7a0d5d253b55ee35752525 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Sun, 29 May 2022 17:08:18 +0200 Subject: [PATCH] Add The Financial Express (India) --- README.md | 1 + changelog.txt | 1 + contentScript.js | 13 +++++++++++++ custom/manifest.json | 2 +- manifest.json | 3 ++- sites.js | 5 +++++ sites_updated.json | 11 +++++++++++ 7 files changed, 34 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dfede4a..99f2a1e 100755 --- a/README.md +++ b/README.md @@ -732,6 +732,7 @@ Grouped in options:\ [Mid-Day](https://www.mid-day.com) - [Outlook](https://www.outlookindia.com) - [The Economic Times (ET Prime)](https://economictimes.indiatimes.com) - +[The Financial Express](https://www.financialexpress.com) - [The Hindu](https://www.thehindu.com) - [The Hindu BusinessLine](https://www.thehindubusinessline.com) - [The Indian Express](https://indianexpress.com) - diff --git a/changelog.txt b/changelog.txt index fb5b867..c5232f9 100644 --- a/changelog.txt +++ b/changelog.txt @@ -7,6 +7,7 @@ Add Gazet van Antwerpen Add Het Belang van Limburg Add Het Nieuwsblad Add SlideShare +Add The Financial Express (India) Remove Scribd (fix obsolete) Fix El Mercurio (+ regional/opt-in to custom sites) Fix Telegraaf.nl diff --git a/contentScript.js b/contentScript.js index f919442..c53c682 100755 --- a/contentScript.js +++ b/contentScript.js @@ -2781,6 +2781,19 @@ else if (matchDomain('entrepreneur.com')) { } } +else if (matchDomain('financialexpress.com')) { + let paywall = document.querySelector('div.paywall'); + if (paywall) + paywall.classList.remove('paywall'); + let register = document.querySelector('div.pcl-wrap'); + let ads; + if (window.location.pathname.endsWith('/lite/')) + ads = document.querySelectorAll('amp-ad, amp-embed, .ad-bg-container'); + else + ads = document.querySelectorAll('div[class*="-ads-blocks-ad-unit"]'); + removeDOMElement(register, ...ads); +} + else if (matchDomain('firstthings.com')) { let paywall = document.querySelector('.paywall'); removeDOMElement(paywall); diff --git a/custom/manifest.json b/custom/manifest.json index b204bfa..066458b 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -42,5 +42,5 @@ "webRequestBlocking", "" ], - "version": "2.7.0.4" + "version": "2.7.0.5" } diff --git a/manifest.json b/manifest.json index dc8f342..b504503 100755 --- a/manifest.json +++ b/manifest.json @@ -206,6 +206,7 @@ "*://*.faz.net/*", "*://*.fd.nl/*", "*://*.finance.si/*", + "*://*.financialexpress.com/*", "*://*.financialpost.com/*", "*://*.firstthings.com/*", "*://*.fnlondon.com/*", @@ -669,5 +670,5 @@ "*://*.wsj.net/*", "*://webcache.googleusercontent.com/*" ], - "version": "2.7.0.4" + "version": "2.7.0.5" } diff --git a/sites.js b/sites.js index b4ceb3b..6791a88 100755 --- a/sites.js +++ b/sites.js @@ -1654,6 +1654,11 @@ var defaultSites = { allow_cookies: 1, block_regex: /(\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/ }, + "The Financial Express": { + domain: "financialexpress.com", + allow_cookies: 1, + block_regex: /(\.financialexpress\.com\/.+\/min\/premiumStoryContent\.js|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/ + }, "The Globe and Mail": { domain: "theglobeandmail.com", block_regex: /(\.theglobeandmail\.com\/pf\/dist\/engine\/react\.js|smartwall\.theglobeandmail\.com\/)/ diff --git a/sites_updated.json b/sites_updated.json index 230fd02..137e63b 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -35,6 +35,17 @@ ], "new_site": 1 }, + "The Financial Express": { + "domain": "financialexpress.com", + "allow_cookies": 1, + "block_regex": "(\\.financialexpress\\.com\\/.+\\/min\\/premiumStoryContent\\.js|cdn\\.ampproject\\.org\\/v\\d\\/amp-access-.+\\.js)", + "cs_code": [{ + "cond": ".paywall", + "rm_class": "paywall" + } + ], + "new_site": 1 + }, "The Globe and Mail": { "domain": "theglobeandmail.com", "block_regex": "(\\.theglobeandmail\\.com\\/pf\\/dist\\/engine\\/react\\.js|smartwall\\.theglobeandmail\\.com\\/)"