From aa306749d3a0e6e862e252661572610a3b47578e Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Sun, 25 Jun 2023 09:55:49 +0200 Subject: [PATCH] Add Hindu Tamil Thisai (India) --- README.md | 1 + changelog.txt | 1 + contentScript.js | 11 +++++++++++ custom/manifest.json | 2 +- manifest.json | 3 ++- sites.js | 4 ++++ sites_updated.json | 5 +++++ 7 files changed, 25 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2a82b84..a927fea 100644 --- a/README.md +++ b/README.md @@ -831,6 +831,7 @@ Grouped in options:\ ##### India [BQ Prime](https://www.bqprime.com) - +[Hindu Tamil Thisai](https://www.hindutamil.in) - [Hindustan Times](https://www.hindustantimes.com) - [Inc42](https://inc42.com) - [India Today](https://www.indiatoday.in) - diff --git a/changelog.txt b/changelog.txt index 0421099..0b94d9a 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 Follow the Money (Ftm.eu) +Add Hindu Tamil Thisai (India) Fix Gazzetta.it (text only) Fix LeScienze.it Fix LeTelegramme.fr (css) diff --git a/contentScript.js b/contentScript.js index e522ab4..8659285 100644 --- a/contentScript.js +++ b/contentScript.js @@ -3594,6 +3594,17 @@ else if (matchDomain('hindustantimes.com')) { removeDOMElement(close_story, ...ads); } +else if (matchDomain('hindutamil.in')) { + if (!window.location.pathname.startsWith('/amp/')) { + let paywall = document.querySelector('div.premium-class-bt'); + let amphtml = document.querySelector('link[rel="amphtml"]'); + if (paywall && amphtml) { + removeDOMElement(paywall); + window.location.href = amphtml.href; + } + } +} + else if (matchDomain('historyextra.com')) { let article_masked = document.querySelector('.template-article__masked'); if (article_masked) { diff --git a/custom/manifest.json b/custom/manifest.json index 9b28a48..c6fee1a 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -51,5 +51,5 @@ "webRequestBlocking", "*://*/*" ], - "version": "3.2.1.3" + "version": "3.2.1.4" } diff --git a/manifest.json b/manifest.json index a8165e0..8816e67 100644 --- a/manifest.json +++ b/manifest.json @@ -291,6 +291,7 @@ "*://*.heraldsun.com.au/*", "*://*.hilltimes.com/*", "*://*.hindustantimes.com/*", + "*://*.hindutamil.in/*", "*://*.historyextra.com/*", "*://*.hollywoodreporter.com/*", "*://*.housebeautiful.com/*", @@ -757,5 +758,5 @@ "*://*.wyleex.com/*", "*://webcache.googleusercontent.com/*" ], - "version": "3.2.1.3" + "version": "3.2.1.4" } diff --git a/sites.js b/sites.js index 84526c0..ceb1755 100644 --- a/sites.js +++ b/sites.js @@ -974,6 +974,10 @@ var defaultSites = { allow_cookies: 1, block_regex: /\.ensighten\.com\/.+\/Bootstrap\.js/ }, + "Hindu Tamil Thisai": { + domain: "hindutamil.in", + allow_cookies: 1 + }, "Hindustan Times": { domain: "hindustantimes.com", allow_cookies: 1, diff --git a/sites_updated.json b/sites_updated.json index c87f414..1d3982a 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -10,6 +10,11 @@ "block_regex": "(scripts\\.repubblica\\.it\\/pw\\/pw\\.js|cdn\\.ampproject\\.org\\/v\\d\\/amp-(access|user-notification)-.+\\.js)", "useragent": "googlebot" }, + "Hindu Tamil Thisai": { + "domain": "hindutamil.in", + "allow_cookies": 1, + "amp_redirect": "div.premium-class-bt" + }, "Le Télégramme": { "domain": "letelegramme.fr", "allow_cookies": 1,