From ee5ebd86d32295bd0a8127a8c7ac8d403539cb0a Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Tue, 10 May 2022 21:22:29 +0200 Subject: [PATCH] Add UnHerd (UK) --- README.md | 3 ++- changelog.txt | 1 + contentScript.js | 2 +- manifest.json | 3 ++- sites.js | 7 ++++++- sites_updated.json | 5 +++++ 6 files changed, 17 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a617a5cd..64c8a201 100644 --- a/README.md +++ b/README.md @@ -359,7 +359,8 @@ Grouped in options:\ [The Spectator](https://www.spectator.co.uk) - [The Telegraph](https://www.telegraph.co.uk) - [The Times (link to archive.today)](https://www.thetimes.co.uk) - -[The Times Literary Supplement](https://www.the-tls.co.uk) +[The Times Literary Supplement](https://www.the-tls.co.uk) - +[UnHerd](https://unherd.com) ##### Denmark diff --git a/changelog.txt b/changelog.txt index dd198cd1..6a97a841 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,7 @@ Changelog Bypass Paywalls Clean - Firefox Post-release +Add UnHerd (UK) Remove The Japan Times (fix obsolete) Fix Lequipe.fr (json) diff --git a/contentScript.js b/contentScript.js index 4d5afd7b..37227f48 100644 --- a/contentScript.js +++ b/contentScript.js @@ -1362,7 +1362,7 @@ else if (matchDomain('lequipe.fr')) { window.setTimeout(function () { ext_api.runtime.sendMessage({request: 'refreshCurrentTab'}); }, 500); - json = json.replace(/keywords:\[([\w\,\$]+)\]/g, "keywords:\"\"").replace(/([{,])([a-zA-Z_]+\d?):/g, "$1\"$2\":").replace(/\":(\[)?([\w\$\.]+)([\]},])/g, "\":$1\"$2\"$3").replace(/},([\w]+),{/g, "},\"$1\",{").replace(/},(\w{2})\]}/g, "},\"$1\"]}"); + json = json.replace(/keywords:\[([\w\,\$]+)\]/g, "keywords:\"\"").replace(/([{,])([a-zA-Z_]+\d?):/g, "$1\"$2\":").replace(/\":(\[)?([\w\$\.]+)([\]},])/g, "\":$1\"$2\"$3").replace(/},([\w]+),{/g, "},\"$1\",{").replace(/}(,\w{2})+(\]}|,{)/g, "}$2"); json = JSON.parse(json); if (json.items) { let pars = json.items.filter(x => x.objet && x.objet.paragraphs)[0].objet.paragraphs; diff --git a/manifest.json b/manifest.json index d48733f7..f27f0003 100644 --- a/manifest.json +++ b/manifest.json @@ -586,6 +586,7 @@ "*://*.tucson.com/*", "*://*.tulsaworld.com/*", "*://*.twincities.com/*", + "*://*.unherd.com/*", "*://*.upstreamonline.com/*", "*://*.usatoday.com/*", "*://*.usinenouvelle.com/*", @@ -670,5 +671,5 @@ "*://*.wsj.net/*", "*://webcache.googleusercontent.com/*" ], - "version": "2.6.8.1" + "version": "2.6.8.2" } diff --git a/sites.js b/sites.js index 897ab635..f2de8c0f 100644 --- a/sites.js +++ b/sites.js @@ -1838,6 +1838,11 @@ var defaultSites = { domain: "trouw.nl", group_rule: "###_gr_nl_pg_domains" }, + "UnHerd": { + domain: "unherd.com", + allow_cookies: 1, + block_regex: /\.piano\.io\// + }, "USA Today": { domain: "usatoday.com", allow_cookies: 1, @@ -2086,4 +2091,4 @@ var usa_theathletic_domains = grouped_sites['###_usa_theathletic']; // sites with no fix (background) var nl_ad_region_domains = ['ad.nl', 'bd.nl', 'ed.nl', 'tubantia.nl', 'bndestem.nl', 'pzc.nl', 'destentor.nl', 'gelderlander.nl']; -var nofix_sites = ['africaintelligence.com', 'africaintelligence.fr', 'aftenposten.no', 'bild.de', 'borsen.dk', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'caravanmagazine.in', 'cnbc.com', 'courrierinternational.com', 'elordenmundial.com', 'epw.in', 'expresso.pt', 'ftchinese.com', 'gazzetta.it', 'hln.be', 'ilmanifesto.it', 'ilsole24ore.com', 'irishtimes.com', 'jacobinmag.com', 'japantimes.co.jp', 'jeunesafrique.com', 'lavozdegalicia.es', 'leconomiste.com', 'lefigaro.fr', 'lemonde.fr', 'lepoint.fr', 'liberation.fr', 'mediapart.fr', 'milanofinanza.it', 'mondediplo.com', 'moneycontrol.com', 'nieuwsblad.be', 'nknews.org', 'ouest-france.fr', 'politiken.de', 'publico.pt', 'republic.ru', 'rp-online.de', 'spiegel.de', 'standaard.be', 'statnews.com', 'stern.de', 'straitstimes.com', 'sueddeutsche.de', 'tagesanzeiger.ch', 'tagesspiegel.de', 'the-ken.com', 'theinformation.com', ' themorningcontext.com', 'theparisreview.org', 'thewirechina.com', 'welt.de', 'ynet.co.il'].concat(nl_ad_region_domains); +var nofix_sites = ['africaintelligence.com', 'africaintelligence.fr', 'aftenposten.no', 'bild.de', 'borsen.dk', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'caravanmagazine.in', 'cnbc.com', 'courrierinternational.com', 'elordenmundial.com', 'epw.in', 'expresso.pt', 'ftchinese.com', 'gazzetta.it', 'hln.be', 'ilmanifesto.it', 'ilsole24ore.com', 'irishtimes.com', 'jacobinmag.com', 'japantimes.co.jp', 'jeunesafrique.com', 'lavozdegalicia.es', 'leconomiste.com', 'lefigaro.fr', 'lemonde.fr', 'lepoint.fr', 'liberation.fr', 'mediapart.fr', 'milanofinanza.it', 'mondediplo.com', 'moneycontrol.com', 'nieuwsblad.be', 'nknews.org', 'ouest-france.fr', 'politiken.de', 'publico.pt', 'republic.ru', 'rp-online.de', 'spiegel.de', 'standaard.be', 'statnews.com', 'stern.de', 'straitstimes.com', 'sueddeutsche.de', 'tagesanzeiger.ch', 'tagesspiegel.de', 'the-ken.com', 'theinformation.com', ' themorningcontext.com', 'theparisreview.org', 'thewirechina.com', 'welt.de', 'wiwo.de', 'ynet.co.il'].concat(nl_ad_region_domains); diff --git a/sites_updated.json b/sites_updated.json index df049c76..1618b1ce 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -62,5 +62,10 @@ } ], "new_site": 1 + }, + "UnHerd": { + "domain": "unherd.com", + "allow_cookies": 1, + "block_regex": "\\.piano\\.io\\/" } }