diff --git a/changelog.txt b/changelog.txt index 07a2132..c6f4096 100644 --- a/changelog.txt +++ b/changelog.txt @@ -12,6 +12,7 @@ Fix LesEchos.fr (json) Fix NzHerald (css) Fix SOFREP (plus) Fix StuDocu (timing) +Fix Volksfreund.de Update block general paywall script (Steady) * v3.0.2.0 (2023-01-22) @@ -30,14 +31,14 @@ Fix TheTimes.co.uk (overlay) Update popup (fix clear cookies; custom version) * v3.0.1.0 (2023-01-15) +Remove Repubblica.it (fix obsolete) +Remove Republic.ru (fix obsolete) Fix Inc42 Fix LesEchos.fr (investir) Fix Madsack Mediengruppe (identify site in cs) Fix National Review (no amp) Fix The Athletic (error) Fix Vogue Business -Remove Repubblica.it (fix obsolete) -Remove Republic.ru (fix obsolete) Update custom sites (default block cookies) Update popup (Google Search Tool) diff --git a/contentScript.js b/contentScript.js index 32deaf9..49f7ca9 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', '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', 'ilfoglio.it', 'inc42.com', 'indianexpress.com', 'ksta.de', 'lanouvellerepublique.fr', 'latimes.com', 'lc.nl', 'lesechos.fr', 'livemint.com', 'mid-day.com', 'nationalreview.com', 'nknews.org', 'nw.de', 'nytimes.com', 'nzherald.co.nz', '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(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', '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', 'ilfoglio.it', 'inc42.com', 'indianexpress.com', 'ksta.de', 'lanouvellerepublique.fr', 'latimes.com', 'lc.nl', 'lesechos.fr', 'livemint.com', 'mid-day.com', 'nationalreview.com', 'nknews.org', 'nw.de', 'nytimes.com', 'nzherald.co.nz', '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(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, usa_mcc_domains); if (!matchDomain(arr_localstorage_hold)) { window.localStorage.clear(); } @@ -59,9 +59,9 @@ if (bg2csData.ld_json && dompurify_loaded) { let json_script = getArticleJsonScript(); if (json_script) { try { - let json = JSON.parse(json_script.text); + let json = JSON.parse(json_script.text.replace(/[\r\n]/g, '').replace(/(\\r)?\\n/g, '
')); let json_key = Object.keys(json).find(key => key.match(/^(articlebody|text)$/i)); - let json_text = parseHtmlEntities(json[json_key].replace(/(\r)?\n/g, '

')); + let json_text = parseHtmlEntities(json[json_key]); let content = document.querySelector(article_sel); if (json_text && content) { let parser = new DOMParser(); @@ -728,7 +728,7 @@ else if (matchDomain('philomag.de')) { if (json_script) { let json = JSON.parse(json_script.text); if (json) { - let json_text = json.articlebody.replace('%paywall%', '').replace(/(\\r)?\\n/g, '

'); + let json_text = json.articlebody.replace(/%paywall%/g, '').replace(/(\\r)?\\n/g, '

'); let content = document.querySelector('div.content-center > div.description'); if (json_text && content) { content.innerHTML = ''; @@ -3615,7 +3615,7 @@ else if (matchDomain('nationalgeographic.com')) { if (overlay) overlay.classList.remove('Article__Content__Overlay--gated'); } - let ads = document.querySelectorAll('div.ad-slot'); + let ads = document.querySelectorAll('div.ad-slot, div.InsertedAd'); removeDOMElement(...ads); }, 1000); } diff --git a/custom/sites_custom.json b/custom/sites_custom.json index 74bd203..616be85 100644 --- a/custom/sites_custom.json +++ b/custom/sites_custom.json @@ -95,6 +95,12 @@ "block_regex": "js\\.pelcro\\.com", "domain": "edweek.org" }, + "Elfinancierocr.com": { + "allow_cookies": 1, + "block_regex": "(\\.tinypass\\.com|cdn\\.ampproject\\.org\\/v\\d\\/amp-subscriptions-.+\\.js)", + "cs_code": "[{\"cond\":\"div.article-body-wrapper__styled[style]\",\"rm_attrib\":\"style\"},{\"cond\":\"div.post\",\"rm_elem\":1}]", + "domain": "elfinancierocr.com" + }, "Elpais.com.uy": { "allow_cookies": 1, "amp_redirect": "div.contenido-exclusivo-nota", @@ -150,6 +156,11 @@ "domain": "gplanet.co.il", "ld_json": "div.subscription-form|div.content-inner" }, + "Hartenergy.com": { + "allow_cookies": 1, + "block_regex": "js\\.pelcro\\.com", + "domain": "hartenergy.com" + }, "Heidi.news": { "allow_cookies": 1, "block_regex": "\\.piano\\.io", @@ -243,6 +254,11 @@ "domain": "milesplit.com", "useragent": "facebookbot" }, + "Mining-journal.com": { + "allow_cookies": 1, + "domain": "mining-journal.com", + "ld_json": "div.article-teaser|div.article-content>p" + }, "Nationalobserver.com": { "allow_cookies": 1, "block_regex": "\\.tinypass\\.com", diff --git a/sites.js b/sites.js index ac4a8f4..2e53c9d 100644 --- a/sites.js +++ b/sites.js @@ -1240,7 +1240,7 @@ var defaultSites = { "thestate.com", "tri-cityherald.com" ], - block_regex: /(js\.matheranalytics\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|subscriptions)-.+\.js)/ + block_regex: "(\\.{domain}\\/script\\.js|\\.blueconic\\.net\\/|js\\.matheranalytics\\.com|cdn\\.ampproject\\.org\\/v\\d\\/amp-access-.+\\.js)" }, "Mediahuis Nederland Regional": { domain: "###_nl_mediahuis_region", @@ -1626,6 +1626,10 @@ var defaultSites = { domain: "saarbruecker-zeitung.de", allow_cookies: 1, useragent: "facebookbot" + }, { + domain: "volksfreund.de", + allow_cookies: 1, + useragent: "facebookbot" } ] },