From 4e39f20be1b1050b53e6768d290dd8d320382a63 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Sat, 8 Jan 2022 16:43:25 +0100 Subject: [PATCH] Fix The Indian Express (premium) --- changelog.txt | 1 + contentScript.js | 6 +++++- manifest.json | 2 +- sites.js | 2 +- sites_updated.json | 5 +++++ 5 files changed, 13 insertions(+), 3 deletions(-) diff --git a/changelog.txt b/changelog.txt index 54fa981..8f42f79 100644 --- a/changelog.txt +++ b/changelog.txt @@ -5,6 +5,7 @@ Post-release Add group Hearst Communications (local USA) Fix Bloomberg (timing) Fix Handelsblatt (no amp) +Fix The Indian Express (premium) Fix trimmed referer (restrictions) * v2.5.0.0 (2022-01-02) diff --git a/contentScript.js b/contentScript.js index aab4779..b4fdb29 100644 --- a/contentScript.js +++ b/contentScript.js @@ -2422,8 +2422,12 @@ else if (matchDomain('indianexpress.com')) { if (window.location.pathname.endsWith('/lite/')) amp_unhide_access_hide('="metering.result=\'ALLOW_ACCESS\'"', '', '.amp-ad, amp-embed'); else { + let paywall = document.querySelector('div#pcl-rest-content[style]'); + if (paywall) + paywall.removeAttribute('style'); + let register = document.querySelector('div#app-pcl'); let ads = document.querySelectorAll('div[class^="adsbox"]'); - removeDOMElement(...ads); + removeDOMElement(register, ...ads); } } diff --git a/manifest.json b/manifest.json index 314801c..1d27f26 100644 --- a/manifest.json +++ b/manifest.json @@ -606,5 +606,5 @@ "*://*.wsj.net/*", "*://*.zephr.com/*" ], - "version": "2.5.0.4" + "version": "2.5.0.5" } diff --git a/sites.js b/sites.js index b497712..ff02fc8 100644 --- a/sites.js +++ b/sites.js @@ -1493,7 +1493,7 @@ var defaultSites = { "The Indian Express": { domain: "indianexpress.com", allow_cookies: 1, - block_regex: /(\/indianexpress\.com\/.+\/indianexpress\/js\/evolok\/.+\.js|cdn\.ampproject\.org\/v\d\/amp-(access|(sticky-)?ad)-.+\.js)/ + block_regex: /(\/indianexpress\.com\/.+\/indianexpress\/js\/(evolok\/.+|min\/premiumContent)\.js|cdn\.ampproject\.org\/v\d\/amp-(access|(sticky-)?ad)-.+\.js)/ }, "The Intercept": { domain: "theintercept.com", diff --git a/sites_updated.json b/sites_updated.json index 59d9a64..2025945 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -45,6 +45,11 @@ } ] }, + "The Indian Express": { + "domain": "indianexpress.com", + "allow_cookies": 1, + "block_regex": "(\\/indianexpress\\.com\\/.+\\/indianexpress\\/js\\/(evolok\\/.+|min\\/premiumContent)\\.js|cdn\\.ampproject\\.org\\/v\\d\\/amp-(access|(sticky-)?ad)-.+\\.js)" + }, "The New Statesman": { "domain": "newstatesman.com", "allow_cookies": 1,