From 9dce981078ea7d5b0e54a17b061292153b2869d4 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Tue, 27 Dec 2022 12:51:47 +0100 Subject: [PATCH] Add Bulletin of the Atomic Scientists --- README.md | 1 + background.js | 2 +- changelog.txt | 1 + contentScript.js | 13 ++++++++++++- manifest.json | 3 ++- sites.js | 5 +++++ sites_updated.json | 7 +++++++ 7 files changed, 29 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a8c1e1d..93d75f8 100644 --- a/README.md +++ b/README.md @@ -134,6 +134,7 @@ Grouped in options:\ *[PEI Media](https://www.thisispei.com)* sites (opt-in to custom sites) ##### Tech/Science +[Bulletin of the Atomic Scientists](https://thebulletin.org) - [Chemical & Engineering News](https://cen.acs.org) - [Discover Magazine](https://www.discovermagazine.com) - [Medscape](https://www.medscape.com) - diff --git a/background.js b/background.js index eccd70e..cdb2e90 100644 --- a/background.js +++ b/background.js @@ -12,7 +12,7 @@ if (typeof ext_api.action !== 'object') { ext_api.action = ext_api.browserAction; } -const dompurify_sites = ['arcinfo.ch', 'asiatimes.com', 'bloomberg.com', 'cicero.de', 'dn.no', 'ilmanifesto.it', 'iltalehti.fi', 'iltirreno.it', 'ipolitics.ca', 'italiaoggi.it', 'lanuovasardegna.it', 'lequipe.fr', 'lesechos.fr', 'marianne.net', 'newleftreview.org', 'newscientist.com', 'nzherald.co.nz', 'outlookbusiness.com', 'prospectmagazine.co.uk', 'sloanreview.mit.edu', 'stratfor.com', 'techinasia.com', 'timesofindia.com', 'valor.globo.com', 'vn.nl'].concat(nl_mediahuis_region_domains, no_nhst_media_domains); +const dompurify_sites = ['arcinfo.ch', 'asiatimes.com', 'bloomberg.com', 'cicero.de', 'dn.no', 'ilmanifesto.it', 'iltalehti.fi', 'iltirreno.it', 'ipolitics.ca', 'italiaoggi.it', 'lanuovasardegna.it', 'lequipe.fr', 'lesechos.fr', 'marianne.net', 'newleftreview.org', 'newscientist.com', 'nzherald.co.nz', 'outlookbusiness.com', 'prospectmagazine.co.uk', 'sloanreview.mit.edu', 'stratfor.com', 'techinasia.com', 'thebulletin.org', 'timesofindia.com', 'valor.globo.com', 'vn.nl'].concat(nl_mediahuis_region_domains, no_nhst_media_domains); var optin_setcookie = false; var optin_update = true; var blocked_referer = false; diff --git a/changelog.txt b/changelog.txt index c371c4e..87e690e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,7 @@ Changelog Bypass Paywalls Clean - Firefox Post-release +Add Bulletin of the Atomic Scientists Add Limburger.nl (link to archive.is) Add Republic.ru Add TheVillage.ru diff --git a/contentScript.js b/contentScript.js index 6758cb4..93e8740 100644 --- a/contentScript.js +++ b/contentScript.js @@ -41,7 +41,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', 'economictimes.com', 'eldiario.es', 'elespanol.com', 'elle.fr', 'elpais.com', 'elperiodico.com', 'enotes.com', 'estadao.com.br', 'forbes.com', 'fortune.com', 'freiepresse.de', 'ilfoglio.it', 'inc42.com', 'indianexpress.com', 'ksta.de', 'lanouvellerepublique.fr', 'latimes.com', 'lesechos.fr', 'livemint.com', 'mid-day.com', 'nknews.org', 'nw.de', 'nytimes.com', 'nzherald.co.nz', 'nwzonline.de', 'rundschau-online.de', '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); +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', 'economictimes.com', 'eldiario.es', 'elespanol.com', 'elle.fr', 'elpais.com', 'elperiodico.com', 'enotes.com', 'estadao.com.br', 'forbes.com', 'fortune.com', 'freiepresse.de', 'ilfoglio.it', 'inc42.com', 'indianexpress.com', 'ksta.de', 'lanouvellerepublique.fr', 'latimes.com', 'lesechos.fr', 'livemint.com', 'mid-day.com', 'nknews.org', 'nw.de', 'nytimes.com', 'nzherald.co.nz', 'nwzonline.de', 'rundschau-online.de', 'sandiegouniontribune.com', 'scmp.com', 'seekingalpha.com', 'substack.com', 'telegraph.co.uk', 'tes.com', 'theatlantic.com', 'thebulletin.org', '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(); } @@ -3884,6 +3884,17 @@ else if (matchDomain('theatlantic.com')) { removeDOMElement(...banners); } +else if (matchDomain('thebulletin.org')) { + let url = window.location.href; + let paywall = document.querySelector('div.article--cropped'); + 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#body-copy'); + } +} + else if (matchDomain('thedailybeast.com')) { let paywall = document.querySelector('div.Body__paywall-container'); if (paywall) { diff --git a/manifest.json b/manifest.json index eff5bd4..75f48c4 100644 --- a/manifest.json +++ b/manifest.json @@ -588,6 +588,7 @@ "*://*.theatlantic.com/*", "*://*.theaustralian.com.au/*", "*://*.thebanker.com/*", + "*://*.thebulletin.org/*", "*://*.thecourier.com.au/*", "*://*.thecritic.co.uk/*", "*://*.thecut.com/*", @@ -717,5 +718,5 @@ "*://*.wallkit.net/*", "*://webcache.googleusercontent.com/*" ], - "version": "2.9.8.8" + "version": "2.9.8.9" } diff --git a/sites.js b/sites.js index 3188fb7..ec52c05 100644 --- a/sites.js +++ b/sites.js @@ -232,6 +232,11 @@ var defaultSites = { allow_cookies: 1, block_regex: /(cdn\.cxense\.com\/|\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js)/ }, + "Bulletin of the Atomic Scientists": { + domain: "thebulletin.org", + allow_cookies: 1, + block_regex: /\.tinypass\.com\// + }, "Business Insider": { domain: "businessinsider.com", block_regex: /(\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/ diff --git a/sites_updated.json b/sites_updated.json index 6985e78..eb77910 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -1,4 +1,11 @@ { + "Bulletin of the Atomic Scientists": { + "domain": "thebulletin.org", + "allow_cookies": 1, + "block_regex": "\\.tinypass\\.com", + "ld_google_webcache": "div.article--cropped|div#body-copy", + "new_site": 1 + }, "L'Express": { "domain": "lexpress.fr", "allow_cookies": 1,