From 94fb6999465d3bf7e77c03e7c0aa7a6a52397224 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Fri, 23 Jul 2021 17:47:39 +0200 Subject: [PATCH] Fix Times of India (TOI+ region block) --- changelog.txt | 1 + contentScript.js | 13 ++++++++++++- manifest.json | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index 43828a1..4dfef32 100644 --- a/changelog.txt +++ b/changelog.txt @@ -8,6 +8,7 @@ Fix Alma Talent sites Fix Bloomberg Fix Nikkei Asian Review (cookies) Fix The Daily Telegraph (au) +Fix Times of India (TOI+ region block) * v2.2.9.0 (2021-07-11) Add TradeWinds diff --git a/contentScript.js b/contentScript.js index 5e03c90..189121c 100644 --- a/contentScript.js +++ b/contentScript.js @@ -16,6 +16,7 @@ var it_repubblica_domains = ['gelocal.it', 'ilsecoloxix.it', 'lanuovasardegna.it var nl_mediahuis_region_domains = ['gooieneemlander.nl', 'haarlemsdagblad.nl', 'ijmuidercourant.nl', 'leidschdagblad.nl', 'noordhollandsdagblad.nl']; var no_nhst_media_domains = ['intrafish.com', 'rechargenews.com', 'tradewindsnews.com', 'upstreamonline.com']; var usa_crainsbiz_domains = ['chicagobusiness.com', 'crainscleveland', 'crainsdetroit', 'crainsnewyork.com']; +var timesofindia_domains = ['timesofindia.com', 'timesofindia.indiatimes.com']; var usa_mcc_domains = ['bnd.com', 'charlotteobserver.com', 'fresnobee.com', 'kansas.com', 'kansascity.com', 'kentucky.com', 'miamiherald.com', 'newsobserver.com', 'sacbee.com', 'star-telegram.com', 'thestate.com', 'tri-cityherald.com']; var usa_tribune_domains = ['baltimoresun.com', 'chicagotribune.com', 'courant.com', 'dailypress.com', 'mcall.com', 'nydailynews.com', 'orlandosentinel.com', 'pilotonline.com', 'sun-sentinel.com']; @@ -2497,6 +2498,16 @@ else if (matchDomain('timeshighereducation.com')) { } } +else if (matchDomain(timesofindia_domains)) { + let region_block = document.querySelector('div.plan-popup.active'); + if (region_block) { + removeDOMElement(region_block); + let overflow = document.querySelector('html[style]'); + if (overflow) + overflow.removeAttribute('style'); + } +} + else if (matchDomain(no_nhst_media_domains)) { let url = window.location.href; if (url.includes('.tradewinds.com/markets/')) { @@ -2524,7 +2535,7 @@ else if (matchDomain(no_nhst_media_domains)) { if (json) { let json_text = json.article.body; let parser = new DOMParser(); - let doc = parser.parseFromString('