diff --git a/README.md b/README.md index 75a297a..c547796 100644 --- a/README.md +++ b/README.md @@ -589,6 +589,7 @@ Grouped in options:\ [Rhein-Zeitung](https://www.rhein-zeitung.de) - [Schwäbische Zeitung](https://www.schwaebische.de) - [Springer Medizin](https://www.springermedizin.de) - +[Vorarlberg Online](https://www.vol.at) - [Weltkunst](https://www.weltkunst.de) - [Westdeutsche Zeitung](https://www.wz.de) diff --git a/changelog.txt b/changelog.txt index b9adf9d..a52c02c 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 Arkansas Democrat-Gazette Add Incisive Media (opt-in to custom sites) +Add Vol.at Remove HBR China (fix obsolete) Remove VentureBeat (no paywall) Fix MediaNews Group (identify sites) diff --git a/contentScript.js b/contentScript.js index 8050744..44ff17e 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 = ['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', 'digiday.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', 'indiatoday.in', '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', 'nwzonline.de', 'nytimes.com', 'nzherald.co.nz', 'record.pt', 'ruhrnachrichten.de', 'rundschau-online.de', 'sandiegouniontribune.com', 'scmp.com', 'seekingalpha.com', 'telegraph.co.uk', 'tes.com', 'theatlantic.com', 'thebulletin.org', 'thecritic.co.uk', 'thetimes.co.uk', 'theweek.com', 'uol.com.br', 'wsj.com'].concat(be_roularta_domains, ca_gcm_domains, ca_torstar_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, nl_dpg_media_domains, no_nhst_media_domains, timesofindia_domains, usa_hearst_comm_domains, usa_mcc_domains); +var arr_localstorage_hold = ['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', 'digiday.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', 'indiatoday.in', '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', 'nwzonline.de', 'nytimes.com', 'nzherald.co.nz', 'record.pt', 'ruhrnachrichten.de', 'rundschau-online.de', 'sandiegouniontribune.com', 'scmp.com', 'seekingalpha.com', 'telegraph.co.uk', 'tes.com', 'theatlantic.com', 'thebulletin.org', 'thecritic.co.uk', 'thetimes.co.uk', 'theweek.com', 'uol.com.br', 'vol.at', 'wsj.com'].concat(be_roularta_domains, ca_gcm_domains, ca_torstar_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, 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(); } @@ -406,8 +406,8 @@ else if (matchDomain('macrobusiness.com.au')) { let json_text = json.filter(x => typeof x === 'string' && x.match(/(<|\\u003C)p>/))[0]; let parser = new DOMParser(); let doc = parser.parseFromString('
' + DOMPurify.sanitize(json_text) + '
', 'text/html'); - let content_new = doc.querySelector('div') - let article = document.querySelector('div.content'); + let content_new = doc.querySelector('div'); + let article = document.querySelector('div.content'); if (article) { article.innerHTML = ''; article.appendChild(content_new); @@ -1148,6 +1148,53 @@ else if (matchDomain(['stuttgarter-nachrichten.de', 'stuttgarter-zeitung.de', 's removeDOMElement(banner); } +else if (matchDomain('vol.at')) { + if (!window.location.pathname.match(/\/amp\/?$/)) { + window.setTimeout(function () { + let paywall = document.querySelector('div.vodl-region-article__premium-content'); + if (paywall && dompurify_loaded) { + paywall.removeAttribute('class'); + if (!paywall.hasChildNodes()) { + console.log('empty'); + let json_script = document.querySelector('script#externalPostDataNode'); + if (json_script) { + try { + let json = JSON.parse(json_script.text); + let json_text = json.content.data.post.content; + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(json_text) + '
', 'text/html'); + let article_new = doc.querySelector('div'); + let hidden_images = article_new.querySelectorAll('img[src^="/"][srcset]'); + let json_domain = json.content.data.post.thumbnail.src.match(/https:\/\/(www\.)?\w+\.at/)[0]; + for (let elem of hidden_images) { + elem.src = elem.src.replace('https://www.vol.at', json_domain); + elem.removeAttribute('srcset'); + } + let hidden_comments = document.querySelector('div.vodl-region-article__content[hidden]'); + if (hidden_comments) { + hidden_comments.removeAttribute('hidden'); + let blurred = hidden_comments.querySelector('div.blur'); + if (blurred) + blurred.classList.remove('blur'); + } + let article = document.querySelector('div.article-body'); + if (article) { + article.innerHTML = ''; + article.appendChild(article_new); + } + } catch (err) { + console.log(err); + } + } + } + } + }, 500); + let banners = document.querySelectorAll('div[id^="rm-adslot-"], div[id^="piano_rec"]'); + hideDOMElement(...banners); + } else + ampToHtml(); +} + else if (matchDomain('zeit.de')) { let url = window.location.href; let paywall = document.querySelector('aside#paywall'); diff --git a/custom/manifest.json b/custom/manifest.json index 72e3dda..13dea95 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -51,5 +51,5 @@ "webRequestBlocking", "*://*/*" ], - "version": "3.3.4.6" + "version": "3.3.4.7" } diff --git a/manifest.json b/manifest.json index 81e00f4..e594a6d 100644 --- a/manifest.json +++ b/manifest.json @@ -721,6 +721,7 @@ "*://*.vn.nl/*", "*://*.vogue.com/*", "*://*.voguebusiness.com/*", + "*://*.vol.at/*", "*://*.volkskrant.nl/*", "*://*.vosgesmatin.fr/*", "*://*.vulture.com/*", @@ -792,5 +793,5 @@ "*://*.wyleex.com/*", "*://webcache.googleusercontent.com/*" ], - "version": "3.3.4.6" + "version": "3.3.4.7" } diff --git a/sites.js b/sites.js index c7c7231..2b96160 100644 --- a/sites.js +++ b/sites.js @@ -2455,6 +2455,12 @@ var defaultSites = { domain: "voguebusiness.com", useragent: "facebookbot" }, + "Vorarlberg Online": { + domain: "vol.at", + allow_cookies: 1, + block_regex: /\.tinypass\.com\//, + cs_dompurify: 1 + }, "Vrij Nederland": { domain: "vn.nl", allow_cookies: 1,