From 4befaaf53bd775dc253246a36c7c5278b6ced8a9 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Sat, 1 Jul 2023 09:21:00 +0200 Subject: [PATCH] Add Puck.news --- README.md | 1 + changelog.txt | 1 + contentScript.js | 17 +++++++++++++++++ custom/manifest.json | 2 +- manifest.json | 3 ++- sites.js | 7 ++++++- sites_updated.json | 7 +++++++ 7 files changed, 35 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4d4940ed..165b4ca9 100644 --- a/README.md +++ b/README.md @@ -195,6 +195,7 @@ Grouped in options:\ [National Review](https://www.nationalreview.com) - [Outdoor Life](https://www.outdoorlife.com) - [Project Syndicate (link to archive.is)](https://www.project-syndicate.org) - +[Puck.news](https://puck.news) - [Slate](https://slate.com) - [SofRep](https://sofrep.com) - [The American Interest](https://www.the-american-interest.com) - diff --git a/changelog.txt b/changelog.txt index 501f1d62..417c4bdb 100644 --- a/changelog.txt +++ b/changelog.txt @@ -5,6 +5,7 @@ Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywal Post-release Add Groupe ESH Medias (ch) Add Hln.be (link to archive.is) +Add Puck.news Add Zeit.de (link to archive.is) Remove AerzteBlatt.de (fix obsolete) Remove LePoint.fr (fix obsolete) diff --git a/contentScript.js b/contentScript.js index 897420b0..c13dce50 100644 --- a/contentScript.js +++ b/contentScript.js @@ -4135,6 +4135,23 @@ else if (matchDomain('project-syndicate.org')) { } } +else if (matchDomain('puck.news')) { + let url = window.location.href; + let paywall = document.querySelector('div.paywall'); + if (paywall) { + removeDOMElement(paywall); + csDoneOnce = true; + let url_cache = 'https://webcache.googleusercontent.com/search?q=cache:' + url.split('?')[0]; + replaceDomElementExt(url_cache, true, false, 'div.entry-content'); + let overlay = document.querySelector('body.paywall-active'); + if (overlay) + overlay.classList.remove('paywall-active'); + let article_style = document.querySelector('article[style]'); + if (article_style) + article_style.removeAttribute('style'); + } +} + else if (matchDomain('quillette.com')) { let url = window.location.href; let paywall = document.querySelector('aside.gh-post-upgrade-cta'); diff --git a/custom/manifest.json b/custom/manifest.json index 5debffd8..4b704b92 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -51,5 +51,5 @@ "webRequestBlocking", "*://*/*" ], - "version": "3.2.2.6" + "version": "3.2.2.7" } diff --git a/manifest.json b/manifest.json index d78e375d..033c2efa 100644 --- a/manifest.json +++ b/manifest.json @@ -528,6 +528,7 @@ "*://*.project-syndicate.org/*", "*://*.prospectmagazine.co.uk/*", "*://*.public.fr/*", + "*://*.puck.news/*", "*://*.pzc.nl/*", "*://*.quillette.com/*", "*://*.quora.com/*", @@ -757,5 +758,5 @@ "*://*.wyleex.com/*", "*://webcache.googleusercontent.com/*" ], - "version": "3.2.2.6" + "version": "3.2.2.7" } diff --git a/sites.js b/sites.js index baca3c40..8e84c09d 100644 --- a/sites.js +++ b/sites.js @@ -1711,6 +1711,11 @@ var defaultSites = { allow_cookies: 1, block_regex: /\.poool\.fr\// }, + "Puck.news": { + domain: "puck.news", + allow_cookies: 1, + cs_dompurify: 1 + }, "Quartz (newsletter)": { domain: "qz.com", allow_cookies: 1, @@ -2585,4 +2590,4 @@ init_custom_flex_domains(); // sites with no fix (background) var it_gedi_nofix_domains = ['gelocal.it', 'huffingtonpost.it', 'ilsecoloxix.it', 'lastampa.it', 'limesonline.com', 'repubblica.it']; -var nofix_sites = ['aamulehti.fi', 'africaintelligence.com', 'africaintelligence.fr', 'aftenposten.no', 'asiatimes.com', 'badische-zeitung.de', 'bild.de', 'bloomberglaw.com', 'bloombergtax.com', 'borsen.dk', 'business-standard.com', 'businessinsider.de', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'caravanmagazine.in', 'catalyst-journal.com', 'compactmag.com', 'courrierinternational.com', 'deutsche-wirtschafts-nachrichten.de', 'diepresse.com', 'elordenmundial.com', 'epw.in', 'expresso.pt', 'finance.si', 'ftchinese.com', 'gamestar.de', 'handelsblatt.com', 'heise.de', 'hs.fi', 'ilsole24ore.com', 'investors.com', 'iltalehti.fi', 'jacobinmag.com', 'jeuneafrique.com', 'kleinezeitung.at', 'lavie.fr', 'lavozdegalicia.es', 'law360.com', 'le1hebdo.fr', 'leconomiste.com', 'lefilmfrancais.com', 'lemonde.fr', 'lepoint.fr', 'lequipe.fr', 'letemps.ch', 'liberation.fr', 'lopinion.fr', 'medianama.com', 'mediapart.fr', 'milanofinanza.it', 'mittelbayerische.de', 'monde-diplomatique.fr', 'mondediplo.com', 'moneycontrol.com', 'morningstar.com', 'nationaljournal.com', 'manager-magazin.de', 'mz.de', 'nature.com', 'nbr.co.nz', 'nn.de', 'nwzonline.de', 'ouest-france.fr', 'philonomist.com', 'pnp.de', 'politicopro.com', 'politiken.dk', 'pressreader.com', 'publico.pt', 'puck.news', 'republic.ru', 'rheinpfalz.de', 'risk.net', 'rnz.de', 'ruhrnachrichten.de', 'saechsische.de', 'schwarzwaelder-bote.de', 'statnews.com', 'stern.de', 'stimme.de', 'straitstimes.com', 'stratfor.com', 'stuttgarter-nachrichten.de', 'stuttgarter-zeitung.de', 'substack.com', 'sueddeutsche.de', 'suedkurier.de', 'swp.de', 'techcrunch.com', 'the-ken.com', 'the-tls.co.uk', 'theinformation.com', 'themorningcontext.com', 'theparisreview.org', 'thewirechina.com', 'volksstimme.de', 'welt.de', 'weltkunst.de', 'weser-kurier.de', 'wiwo.de', 'worldpoliticsreview.com', 'ynet.co.il'].concat(it_gedi_nofix_domains); +var nofix_sites = ['aamulehti.fi', 'africaintelligence.com', 'africaintelligence.fr', 'aftenposten.no', 'asiatimes.com', 'badische-zeitung.de', 'bild.de', 'bloomberglaw.com', 'bloombergtax.com', 'borsen.dk', 'business-standard.com', 'businessinsider.de', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'caravanmagazine.in', 'catalyst-journal.com', 'compactmag.com', 'courrierinternational.com', 'deutsche-wirtschafts-nachrichten.de', 'diepresse.com', 'elordenmundial.com', 'epw.in', 'expresso.pt', 'finance.si', 'ftchinese.com', 'gamestar.de', 'handelsblatt.com', 'heise.de', 'hs.fi', 'ilsole24ore.com', 'investors.com', 'iltalehti.fi', 'jacobinmag.com', 'jeuneafrique.com', 'kleinezeitung.at', 'lavie.fr', 'lavozdegalicia.es', 'law360.com', 'le1hebdo.fr', 'leconomiste.com', 'lefilmfrancais.com', 'lemonde.fr', 'lepoint.fr', 'lequipe.fr', 'letemps.ch', 'liberation.fr', 'lopinion.fr', 'medianama.com', 'mediapart.fr', 'milanofinanza.it', 'mittelbayerische.de', 'monde-diplomatique.fr', 'mondediplo.com', 'moneycontrol.com', 'morningstar.com', 'nationaljournal.com', 'manager-magazin.de', 'mz.de', 'nature.com', 'nbr.co.nz', 'nn.de', 'nwzonline.de', 'ouest-france.fr', 'philonomist.com', 'pnp.de', 'politicopro.com', 'politiken.dk', 'pressreader.com', 'publico.pt', 'republic.ru', 'rheinpfalz.de', 'risk.net', 'rnz.de', 'ruhrnachrichten.de', 'saechsische.de', 'schwarzwaelder-bote.de', 'statnews.com', 'stern.de', 'stimme.de', 'straitstimes.com', 'stratfor.com', 'stuttgarter-nachrichten.de', 'stuttgarter-zeitung.de', 'substack.com', 'sueddeutsche.de', 'suedkurier.de', 'swp.de', 'techcrunch.com', 'the-ken.com', 'the-tls.co.uk', 'theinformation.com', 'themorningcontext.com', 'theparisreview.org', 'thewirechina.com', 'volksstimme.de', 'welt.de', 'weltkunst.de', 'weser-kurier.de', 'wiwo.de', 'worldpoliticsreview.com', 'ynet.co.il'].concat(it_gedi_nofix_domains); diff --git a/sites_updated.json b/sites_updated.json index 064eddd8..4fc63c32 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -62,6 +62,13 @@ "cs_code": "[{\"cond\":\"div.tlg-paywalled\", \"rm_class\": \"tlg-paywalled\"}]", "upd_version": "3.2.1.1" }, + "Puck.news": { + "domain": "puck.news", + "allow_cookies": 1, + "ld_google_webcache": "div.paywall|div.entry-content", + "cs_code": "[{\"cond\":\"body.paywall-active\", \"rm_class\":\"paywall-active\"},{\"cond\":\"article[style]\", \"rm_attrib\":\"style\"}]", + "upd_version": "3.2.2.7" + }, "Quora (regwall)": { "domain": "quora.com", "allow_cookies": 1,