From b9b27d3ddd47c85c1ffeeb2f446e1b9c8038dcb7 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Mon, 24 Oct 2022 16:35:15 +0200 Subject: [PATCH] Add Tes Magazine --- README.md | 1 + changelog.txt | 1 + contentScript.js | 9 +++++++-- manifest.json | 3 ++- sites.js | 6 +++++- sites_updated.json | 13 ++++++++++++- 6 files changed, 28 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c4b87d7f..37ce1880 100644 --- a/README.md +++ b/README.md @@ -393,6 +393,7 @@ Grouped in options:\ [New Left Review](https://newleftreview.org) - [Private Equity News](https://www.penews.com) - [Prospect Magazine](https://www.prospectmagazine.co.uk) - +[Tes Magazine](https://www.tes.com/magazine) - [The Banker](https://www.thebanker.com) - [The Critic](https://thecritic.co.uk) - [The Economist](https://www.economist.com) - diff --git a/changelog.txt b/changelog.txt index a8d6b645..3ff29d05 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,7 @@ Changelog Bypass Paywalls Clean - Firefox Post-release +Add Tes Magazine * v2.9.0.0 (2022-10-23) Add Humanite.fr diff --git a/contentScript.js b/contentScript.js index 0a9b9868..7d7888db 100644 --- a/contentScript.js +++ b/contentScript.js @@ -40,7 +40,7 @@ var usa_outside_mag_domains = ["backpacker.com", "betamtb.com", "betternutrition var usa_tribune_domains = ['baltimoresun.com', 'chicagotribune.com', 'courant.com', 'dailypress.com', 'mcall.com', 'nydailynews.com', 'orlandosentinel.com', 'pilotonline.com', 'sun-sentinel.com']; // clean local storage of sites (with an exemption for hold-list) -var arr_localstorage_hold = ['aachener-nachrichten.de', 'aachener-zeitung.de', 'allgaeuer-zeitung.de', 'augsburger-allgemeine.de', 'barrons.com', 'businessoffashion.com', 'challenges.fr', 'charliehebdo.fr', 'cmjornal.pt', 'corriere.it', 'corrieredellosport.it', 'cyclingtips.com', 'eldiario.es', 'elespanol.com', 'elle.fr', 'elpais.com', 'elperiodico.com', 'enotes.com', 'estadao.com.br', 'forbes.com', 'fortune.com', 'economictimes.com', 'freiepresse.de', 'ilfoglio.it', 'inc42.com', 'lanouvellerepublique.fr', 'nknews.org', 'latimes.com', 'lesechos.fr', 'livemint.com', 'mid-day.com', 'nw.de', 'nytimes.com', 'nzherald.co.nz', 'sandiegouniontribune.com', 'scmp.com', 'seekingalpha.com', 'substack.com', 'telegraph.co.uk', 'theatlantic.com', 'thecritic.co.uk', 'thetimes.co.uk', 'uol.com.br', 'wsj.com'].concat(ca_gcm_domains, de_funke_medien_domains, de_westfalen_medien_domains, es_epiberica_domains, es_epiberica_custom_domains, es_grupo_vocento_domains, es_unidad_domains, fr_groupe_ebra_domains, fr_groupe_la_depeche_domains, fr_groupe_nice_matin_domains, it_gedi_domains, it_quotidiano_domains, ca_gcm_domains, nl_dpg_media_domains, no_nhst_media_domains, usa_hearst_comm_domains); +var arr_localstorage_hold = ['aachener-nachrichten.de', 'aachener-zeitung.de', 'allgaeuer-zeitung.de', 'augsburger-allgemeine.de', 'barrons.com', 'businessoffashion.com', 'challenges.fr', 'charliehebdo.fr', 'cmjornal.pt', 'corriere.it', 'corrieredellosport.it', 'cyclingtips.com', 'eldiario.es', 'elespanol.com', 'elle.fr', 'elpais.com', 'elperiodico.com', 'enotes.com', 'estadao.com.br', 'forbes.com', 'fortune.com', 'economictimes.com', 'freiepresse.de', 'ilfoglio.it', 'inc42.com', 'lanouvellerepublique.fr', 'nknews.org', 'latimes.com', 'lesechos.fr', 'livemint.com', 'mid-day.com', 'nw.de', 'nytimes.com', 'nzherald.co.nz', 'sandiegouniontribune.com', 'scmp.com', 'seekingalpha.com', 'substack.com', 'telegraph.co.uk', 'tes.com', 'theatlantic.com', 'thecritic.co.uk', 'thetimes.co.uk', 'uol.com.br', 'wsj.com'].concat(ca_gcm_domains, de_funke_medien_domains, de_westfalen_medien_domains, es_epiberica_domains, es_epiberica_custom_domains, es_grupo_vocento_domains, es_unidad_domains, fr_groupe_ebra_domains, fr_groupe_la_depeche_domains, fr_groupe_nice_matin_domains, it_gedi_domains, it_quotidiano_domains, ca_gcm_domains, nl_dpg_media_domains, no_nhst_media_domains, usa_hearst_comm_domains); if (!matchDomain(arr_localstorage_hold)) { window.localStorage.clear(); } @@ -2103,7 +2103,7 @@ else if (matchDomain('vn.nl')) { else csDone = true; -} else if (window.location.hostname.match(/\.(ie|uk)$/) || matchDomain(['scotsman.com'])) {//united kingdom/ireland +} else if (window.location.hostname.match(/\.(ie|uk)$/) || matchDomain(['scotsman.com', 'tes.com'])) {//united kingdom/ireland if (matchDomain(['belfasttelegraph.co.uk', 'independent.ie'])) { let flip_pay = document.querySelector('div#flip-pay[style]'); @@ -2196,6 +2196,11 @@ else if (matchDomain('telegraph.co.uk')) { } } +else if (matchDomain('tes.com')) { + let banner = document.querySelector('div.js-paywall-info'); + removeDOMElement(banner); +} + else if (matchDomain('the-tls.co.uk')) { let paywall = document.querySelector('.tls-subscriptions-banner__closed-skin'); removeDOMElement(paywall); diff --git a/manifest.json b/manifest.json index d6852a41..34c99f66 100644 --- a/manifest.json +++ b/manifest.json @@ -567,6 +567,7 @@ "*://*.telegraph.co.uk/*", "*://*.telerama.fr/*", "*://*.tennessean.com/*", + "*://*.tes.com/*", "*://*.the-american-interest.com/*", "*://*.the-tls.co.uk/*", "*://*.theadvocate.com.au/*", @@ -721,5 +722,5 @@ "*://gcm.omerlocdn.com/*", "*://webcache.googleusercontent.com/*" ], - "version": "2.9.0.0" + "version": "2.9.0.1" } diff --git a/sites.js b/sites.js index 087583ad..a7e58ff5 100644 --- a/sites.js +++ b/sites.js @@ -1628,7 +1628,7 @@ var defaultSites = { domain: "studocu.com", allow_cookies: 1 }, - "Substack": { + "Substack (paywall-content only)": { domain: "substack.com", useragent: "googlebot" }, @@ -1658,6 +1658,10 @@ var defaultSites = { allow_cookies: 1, useragent: "googlebot" }, + "Tes Magazine": { + domain: "tes.com", + remove_cookies_select_drop: ["tg_paywall"] + }, "The (New Orleans) Advocate": { domain: "###_usa_theadvocate", group: [ diff --git a/sites_updated.json b/sites_updated.json index 5e4f0732..3d0cb2da 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -47,6 +47,16 @@ "allow_cookies": 1, "block_regex": "\\.qiota\\.com\\/" }, + "Tes Magazine": { + "domain": "tes.com", + "remove_cookies_select_drop": ["tg_paywall"], + "cs_code": [{ + "cond": "div.js-paywall-info", + "rm_elem": 1 + } + ], + "new_site": 1 + }, "The Scotsman": { "domain": "scotsman.com", "allow_cookies": 1, @@ -55,7 +65,8 @@ "cond": "div.premium.no-entitlement", "rm_class": "no-entitlement" } - ] + ], + "new_site": 1 }, "The Washington Post": { "domain": "washingtonpost.com",