Fix-update Valor Economico (Google webcache)

This commit is contained in:
magnolia1234 2021-05-21 15:10:39 +02:00
parent c1b7d062a6
commit fb12a6beca
6 changed files with 16 additions and 6 deletions

View file

@ -109,7 +109,7 @@ _* free articles only._
[Loeb Classical Library](https://www.loebclassics.com) -
[Philosophy Now](https://philosophynow.org) -
[Quora](https://www.quora.com) -
[Scribd](http://www.scribd.com) -
[Scribd](https://www.scribd.com) -
[Slader](https://www.slader.com) -
[Statista](https://www.statista.com)
@ -554,7 +554,7 @@ Grupo Vocento (ABC) regional sites like
[Folha de S. Paulo](https://www.folha.uol.com.br) -
[O Estado de S. Paulo](https://estadao.com.br) -
[O Globo](https://oglobo.globo.com) -
[Valor Econômico](https://valor.globo.com)*
[Valor Econômico](https://valor.globo.com)
##### Chile
[Diario Financiero](https://www.df.cl) -
[El Mercurio](https://digital.elmercurio.com) -

View file

@ -24,7 +24,6 @@ const restrictions = {
'foreignaffairs.com': /.+\.foreignaffairs\.com\/(articles|fa-caching|interviews|reviews|sites)\/.+/,
'ft.com': /.+\.ft\.com\/content\//,
'gestion.pe': /.+\/gestion\.pe\/.+((\w)+(\-)+){3,}.+/,
'globo.com': /^((?!\/valor\.globo\.com\/).)*$/,
'medianama.com': /\.medianama\.com\/(\d){4}\/(\d){2}\//,
'timesofindia.com': /.+\.timesofindia\.com\/($|toi-plus(\/.+)?|.+\.cms)/,
'nknews.org': /^((?!nknews\.org\/pro\/).)*$/,

View file

@ -5,6 +5,7 @@ Post-release
Add MediaNama (India)
Fix-update Prensa Iberica
Fix-update The Economic Times (mobile/India)
Fix-update Valor Economico (Google webcache)
* v2.2.1.0 (2021-05-16)
Add Las Provincias (Spain)

View file

@ -1475,7 +1475,7 @@ else if (matchDomain('thetimes.co.uk')) {
else if (!matchDomain(['belfasttelegraph.co.uk', 'independent.ie']))
csDone = true;
} else if (window.location.hostname.match(/\.(br|cl|pe)$/) || matchDomain(['elmercurio.com', 'latercera.com', 'lasegunda.com'])) {//south america
} else if (window.location.hostname.match(/\.(br|cl|pe)$/) || matchDomain(['elmercurio.com', 'latercera.com', 'lasegunda.com', 'valor.globo.com'])) {//south america
if (matchDomain(['elcomercio.pe', 'gestion.pe'])) {
let paywall = document.querySelector('.story-content__nota-premium');
@ -1536,6 +1536,16 @@ else if (matchDomain(["mercuriovalpo.cl", "estrellavalpo.cl"])) {
body_modal.classList.remove('modal-open');
}
else if (matchDomain('valor.globo.com')) {
let url = window.location.href;
let paywall = document.querySelector('div.paywall');
if (paywall) {
removeDOMElement(paywall);
let url_cache = 'https://webcache.googleusercontent.com/search?q=cache:' + url;
replaceDomElementExt(url_cache, true, false, 'div.mc-article-body', 'Failed to load from Google webcache: ');
}
}
else
csDone = true;

View file

@ -517,5 +517,5 @@
"*://*.wallkit.net/*",
"*://*.wsj.net/*"
],
"version": "2.2.1.3"
"version": "2.2.1.4"
}

View file

@ -191,7 +191,7 @@ var defaultSites =
"NRC Handelsblad": "nrc.nl",
"NyTeknik": "nyteknik.se",
"O Estado de S. Paulo": "estadao.com.br",
"O Globo": "globo.com",
"O Globo (& Valor Econômico)": "globo.com",
"Observador.pt": "observador.pt",
"Orange County Register": "ocregister.com",
"Palo Alto Online": "paloaltoonline.com",