diff --git a/README.md b/README.md index 28097fa..6482843 100644 --- a/README.md +++ b/README.md @@ -845,6 +845,7 @@ Grouped in options:\ ##### India [BQ Prime](https://www.bqprime.com) - +[Business Standard](https://www.business-standard.com) - [Hindu Tamil Thisai](https://www.hindutamil.in) - [Hindustan Times](https://www.hindustantimes.com) - [Inc42](https://inc42.com) - diff --git a/changelog.txt b/changelog.txt index 69b7a5d..73a2180 100644 --- a/changelog.txt +++ b/changelog.txt @@ -4,6 +4,7 @@ Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywal Post-release Add Auto-motor-und-sport.de +Add Business-standard.com (json) Add Medienholding Süd (opt-in to custom sites for unlisted) Add Money.it Add The Times Literary Supplement (json) @@ -175,7 +176,7 @@ Add Epicurious (Conde Nast) Add LeGrandContinent.eu Add Schwaebische.de Add TagesAnzeiger.ch (link to archive.is) -Remove Business Standard (fix obsolete) +Remove Business-standard.com (fix obsolete) Fix BusinessPost.ie (json) Fix Citywire Fix DHnet.be, L'Avenir & LaLibre.be (Add Groupe IPM) @@ -377,7 +378,7 @@ Update custom/updated sites (onMessage in contentScript) Add Handelsblatt Remove 6 Australia News Corp sites (fix obsolete) Remove Law360 (fix obsolete) -Fix Business Standard (images) +Fix Business-standard.com (images) Fix Codesports.com.au (js) Fix DN.no (images) Fix Noz.de (no amp) @@ -507,7 +508,7 @@ Fix NTNews.com.au * v2.8.6.0 (2022-09-25) Add Groupe Centre France (opt-in to custom sites) Fix Aftonbladet.se -Fix Business Standard +Fix Business-standard.com Fix Estadao.com.br (amp) Fix Hearst Communications (newspapers) Fix The (New Orleans) Advocate @@ -563,7 +564,7 @@ Add Nw.de Add Substack custom domains (opt-in to custom sites) Add UOL.com.br Remove Sanoma Media Finland (fix obsolete) -Fix Business Standard (mobile) +Fix Business-standard.com (mobile) Fix El Correo & La Voz de Cadiz Fix LaVie.fr Fix LiveMint (css) @@ -673,7 +674,7 @@ Add L'Avenir (Belgium) Add The Banker Remove Dagens Nyheter (fix obsolete) Remove Valor Economico (fix obsolete) -Fix Business Standard +Fix Business-standard.com Fix El Mercurio Fix Helsingin Sanomat (dynamic-json) Fix Koelner Stadt-Anzeiger & Koelnische Rundschau @@ -1045,7 +1046,7 @@ Remove Irish Times (fix obsolete) Remove Sueddeutsche Zeitung (fix obsolete) Fix ABC.es (Evolok) Fix Bloomberg (charts) -Fix Business Standard +Fix Business-standard.com Fix Il Tirreno (GElocal.it) Fix Financial Times (amp) Fix Knack.be @@ -1302,7 +1303,7 @@ Bugfix Le Dauphine (plus some French sites) Add Dagens Industri (Sweden) Add La Nouvelle Republique du Centre-Ouest (France) Add VeloNews -Fix Business Standard (mobile to desktop) +Fix Business-standard.com (mobile to desktop) Fix El Pais Fix National Geographic USA Fix Stratfor @@ -1681,7 +1682,7 @@ Fix Economist (menu) Fix WaPo (Googlebot & block Javascript) Fix custom sites (block Javascript) Update custom sites: (edit options) & hide double (custom) domain in options -Maintenance contentScript (replace innerHTML): LesEchos.fr (plus reload), Business-Standard.com & NoordhollandsDagblad.nl +Maintenance contentScript (replace innerHTML): LesEchos.fr (plus reload), Business-standard.com & NoordhollandsDagblad.nl Prepare subrelease notification (developer mode) * v1.8.1.0 (2020-08-16) @@ -1719,7 +1720,7 @@ Update paywall scripts: Evolok * v1.7.8.0 (2020-07-06) Add Atavist Magazine Add Belfast Telegraph -Add Business Standard (India) +Add Business-standard.com Add Geelong Advertiser & Western Advocate (plus grouping Australian sites) Add Nautilus Add Newsweek diff --git a/contentScript.js b/contentScript.js index 5d91e67..7e5a6c5 100644 --- a/contentScript.js +++ b/contentScript.js @@ -51,7 +51,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 = ['allgaeuer-zeitung.de', 'augsburger-allgemeine.de', 'barrons.com', 'businessinsider.com', 'businessoffashion.com', 'businesspost.ie', 'challenges.fr', 'charliehebdo.fr', 'cmjornal.pt', 'corriere.it', 'corrieredellosport.it', 'cyclingtips.com', 'dvhn.nl', 'economictimes.com', 'eldiario.es', 'elespanol.com', 'elle.fr', 'elpais.com', 'elperiodico.com', 'enotes.com', 'estadao.com.br', 'forbes.com', 'fortune.com', 'freiepresse.de', 'gauchazh.clicrbs.com.br', 'globo.com', 'ilfoglio.it', 'inc42.com', 'indianexpress.com', 'ksta.de', 'kurier.at', 'lanouvellerepublique.fr', 'latimes.com', 'lc.nl', 'lesechos.fr', 'livemint.com', 'mid-day.com', 'mundodeportivo.com', 'nationalreview.com', 'nrc.nl', 'nw.de', 'nytimes.com', 'nzherald.co.nz', 'record.pt', 'rundschau-online.de', 'sandiegouniontribune.com', 'scmp.com', 'seekingalpha.com', 'telegraph.co.uk', 'tes.com', 'theatlantic.com', 'thebulletin.org', 'thecritic.co.uk', 'thetimes.co.uk', 'uol.com.br', 'wsj.com'].concat(be_roularta_domains, ca_gcm_domains, de_funke_medien_domains, de_lv_domains, de_vrm_domains, de_vrm_custom_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, timesofindia_domains, usa_hearst_comm_domains, usa_mcc_domains); +var arr_localstorage_hold = ['allgaeuer-zeitung.de', 'augsburger-allgemeine.de', 'barrons.com', 'business-standard.com', 'businessinsider.com', 'businessoffashion.com', 'businesspost.ie', 'challenges.fr', 'charliehebdo.fr', 'cmjornal.pt', 'corriere.it', 'corrieredellosport.it', 'cyclingtips.com', 'dvhn.nl', 'economictimes.com', 'eldiario.es', 'elespanol.com', 'elle.fr', 'elpais.com', 'elperiodico.com', 'enotes.com', 'estadao.com.br', 'forbes.com', 'fortune.com', 'freiepresse.de', 'gauchazh.clicrbs.com.br', 'globo.com', 'ilfoglio.it', 'inc42.com', 'indianexpress.com', 'ksta.de', 'kurier.at', 'lanouvellerepublique.fr', 'latimes.com', 'lc.nl', 'lesechos.fr', 'livemint.com', 'mid-day.com', 'mundodeportivo.com', 'nationalreview.com', 'nrc.nl', 'nw.de', 'nytimes.com', 'nzherald.co.nz', 'record.pt', 'rundschau-online.de', 'sandiegouniontribune.com', 'scmp.com', 'seekingalpha.com', 'telegraph.co.uk', 'tes.com', 'theatlantic.com', 'thebulletin.org', 'thecritic.co.uk', 'thetimes.co.uk', 'uol.com.br', 'wsj.com'].concat(be_roularta_domains, ca_gcm_domains, de_funke_medien_domains, de_lv_domains, de_vrm_domains, de_vrm_custom_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, timesofindia_domains, usa_hearst_comm_domains, usa_mcc_domains); if (!matchDomain(arr_localstorage_hold)) { window.localStorage.clear(); } @@ -3492,6 +3492,33 @@ else if (matchDomain('bqprime.com')) { removeDOMElement(...ads); } +else if (matchDomain('business-standard.com')) { + if (!window.location.pathname.startsWith('/amp/')) { + let paywall = document.querySelector('div.subscribe-page'); + if (paywall) { + removeDOMElement(paywall); + let json_script = getArticleJsonScript(); + if (json_script) { + let json = JSON.parse(json_script.text); + if (json) { + let json_text = breakText(parseHtmlEntities(json.articleBody)); + let content = document.querySelector('div.storycontent'); + if (json_text && content) { + content.innerHTML = ''; + let article_new = document.createElement('p'); + article_new.innerText = json_text; + content.appendChild(article_new); + } + } + } + } + let banner = document.querySelector('section.sbcrbtmlfull'); + let ads = document.querySelectorAll('div.advertisement-bg'); + removeDOMElement(banner, ...ads); + } else + ampToHtml(); +} + else if (matchDomain('businessinsider.com')) { let ads = document.querySelectorAll('div.l-ad, div.in-post-sticky, aside.has-video-ad'); hideDOMElement(...ads); @@ -5606,7 +5633,7 @@ function breakText(str) { str = str.replace(/Le\n\n([A-Z])/g, "Le$1"); str = str.replace(/Mc\n\n([A-Z])/g, "Mc$1"); return str; -}; +} function parseHtmlEntities(encodedString) { let parser = new DOMParser(); diff --git a/manifest.json b/manifest.json index a964f39..3643e93 100644 --- a/manifest.json +++ b/manifest.json @@ -120,6 +120,7 @@ "*://*.brisbanetimes.com.au/*", "*://*.britannica.com/*", "*://*.buffalonews.com/*", + "*://*.business-standard.com/*", "*://*.businessinsider.com/*", "*://*.businessoffashion.com/*", "*://*.businesspost.ie/*", diff --git a/sites.js b/sites.js index 761350d..cff2f9c 100644 --- a/sites.js +++ b/sites.js @@ -283,6 +283,10 @@ var defaultSites = { block_regex: /\.piano\.io\//, cs_dompurify: 1 }, + "Business Standard": { + domain: "business-standard.com", + allow_cookies: 1 + }, "California Business Journals": { domain: "###_usa_cbj", group: [ @@ -2597,4 +2601,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', 'aftonbladet.se', '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', 'dn.se', 'elordenmundial.com', 'epw.in', 'expresso.pt', 'finance.si', 'ftchinese.com', 'gamestar.de', 'geo.de', 'golem.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', 'lefigaro.fr', 'le1hebdo.fr', 'leconomiste.com', 'lefilmfrancais.com', 'lemonde.fr', 'lepoint.fr', 'lequipe.fr', 'letemps.ch', 'liberation.fr', 'limburger.nl', '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', 'quillette.com', 'republic.ru', 'rheinpfalz.de', 'risk.net', 'rnz.de', 'ruhrnachrichten.de', 'saechsische.de', 'statnews.com', 'stern.de', 'stimme.de', 'straitstimes.com', 'stratfor.com', 'substack.com', 'sueddeutsche.de', 'suedkurier.de', 'swp.de', 'tagesspiegel.de', 'techcrunch.com', 'the-ken.com', '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', 'aftonbladet.se', 'aftenposten.no', 'asiatimes.com', 'badische-zeitung.de', 'bild.de', 'bloomberglaw.com', 'bloombergtax.com', 'borsen.dk', 'businessinsider.de', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'caravanmagazine.in', 'catalyst-journal.com', 'compactmag.com', 'courrierinternational.com', 'deutsche-wirtschafts-nachrichten.de', 'diepresse.com', 'dn.se', 'elordenmundial.com', 'epw.in', 'expresso.pt', 'finance.si', 'ftchinese.com', 'gamestar.de', 'geo.de', 'golem.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', 'lefigaro.fr', 'le1hebdo.fr', 'leconomiste.com', 'lefilmfrancais.com', 'lemonde.fr', 'lepoint.fr', 'lequipe.fr', 'letemps.ch', 'liberation.fr', 'limburger.nl', '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', 'quillette.com', 'republic.ru', 'rheinpfalz.de', 'risk.net', 'rnz.de', 'ruhrnachrichten.de', 'saechsische.de', 'statnews.com', 'stern.de', 'stimme.de', 'straitstimes.com', 'stratfor.com', 'substack.com', 'sueddeutsche.de', 'suedkurier.de', 'swp.de', 'tagesspiegel.de', 'techcrunch.com', 'the-ken.com', '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 fbd2ae0..e92d993 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -33,6 +33,12 @@ "useragent": "bingbot", "upd_version": "3.1.3.3" }, + "Business Standard": { + "domain": "business-standard.com", + "allow_cookies": 1, + "ld_json": "div.subscribe-page|div.storycontent", + "upd_version": "3.2.6.0" + }, "Correio da Manhã": { "domain": "cmjornal.pt", "allow_cookies": 1,