mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 07:37:47 +01:00
Fix Valor Economico (amp-redirect)
This commit is contained in:
parent
1f9428b634
commit
633c450165
5 changed files with 24 additions and 18 deletions
|
@ -4,6 +4,7 @@ Updates: https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/release
|
||||||
|
|
||||||
Post-release
|
Post-release
|
||||||
Fix Faz.net (json)
|
Fix Faz.net (json)
|
||||||
|
Fix Valor Economico (amp-redirect)
|
||||||
|
|
||||||
* v3.1.0.0 (2023-03-19)
|
* v3.1.0.0 (2023-03-19)
|
||||||
Add Defector
|
Add Defector
|
||||||
|
|
|
@ -44,7 +44,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'];
|
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)
|
// 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', 'kurier.at', 'lanouvellerepublique.fr', 'latimes.com', 'lc.nl', 'lesechos.fr', 'livemint.com', 'mid-day.com', 'nationalreview.com', 'nknews.org', '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(ca_gcm_domains, de_funke_medien_domains, de_lv_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 = ['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', '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', 'nationalreview.com', 'nknews.org', '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(ca_gcm_domains, de_funke_medien_domains, de_lv_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)) {
|
if (!matchDomain(arr_localstorage_hold)) {
|
||||||
window.localStorage.clear();
|
window.localStorage.clear();
|
||||||
}
|
}
|
||||||
|
@ -2670,22 +2670,27 @@ else if (matchDomain('lasegunda.com')) {
|
||||||
|
|
||||||
else if (matchDomain('valor.globo.com')) {
|
else if (matchDomain('valor.globo.com')) {
|
||||||
let url = window.location.href;
|
let url = window.location.href;
|
||||||
let paywall = document.querySelector('div.paywall');
|
if (!window.location.pathname.startsWith('/google/amp/')) {
|
||||||
if (paywall) {
|
let paywall = document.querySelector('div.paywall');
|
||||||
removeDOMElement(paywall);
|
let amphtml = document.querySelector('link[rel="amphtml"]');
|
||||||
csDoneOnce = true;
|
if (paywall && amphtml) {
|
||||||
let url_cache = 'https://webcache.googleusercontent.com/search?q=cache:' + url;
|
removeDOMElement(paywall);
|
||||||
replaceDomElementExt(url_cache, true, false, 'div.protected-content');
|
window.location.href = amphtml.href;
|
||||||
}
|
|
||||||
window.setTimeout(function () {
|
|
||||||
let skeleton_box = document.querySelectorAll('div.glb-skeleton-box');
|
|
||||||
for (let elem of skeleton_box) {
|
|
||||||
elem.classList.remove('glb-skeleton-box');
|
|
||||||
elem.removeAttribute('style');
|
|
||||||
}
|
}
|
||||||
let ads = document.querySelectorAll('[id^="ad-container"], .content-ads');
|
let ads = document.querySelectorAll('[id^="ad-container"], .content-ads');
|
||||||
removeDOMElement(...ads);
|
removeDOMElement(...ads);
|
||||||
}, 1000);
|
} else {
|
||||||
|
amp_unhide_subscr_section('amp-ad, amp-embed');
|
||||||
|
let mobile = window.navigator.userAgent.toLowerCase().includes('mobile');
|
||||||
|
let amp_images = document.querySelectorAll('figure > amp-img[src^="https://"]');
|
||||||
|
for (let amp_image of amp_images) {
|
||||||
|
let elem = document.createElement('img');
|
||||||
|
elem.src = amp_image.getAttribute('src');
|
||||||
|
elem.alt = amp_image.getAttribute('alt');
|
||||||
|
elem.style = mobile ? 'width: 320px;' : 'margin: 0px 250px; display:block;';
|
||||||
|
amp_image.parentNode.replaceChild(elem, amp_image);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (window.location.hostname.endsWith('.cl') && document.querySelector('meta[property="og:image"][content*="://impresa.soy-chile.cl/"]')) {
|
else if (window.location.hostname.endsWith('.cl') && document.querySelector('meta[property="og:image"][content*="://impresa.soy-chile.cl/"]')) {
|
||||||
|
|
|
@ -51,5 +51,5 @@
|
||||||
"webRequestBlocking",
|
"webRequestBlocking",
|
||||||
"*://*/*"
|
"*://*/*"
|
||||||
],
|
],
|
||||||
"version": "3.1.0.1"
|
"version": "3.1.0.2"
|
||||||
}
|
}
|
||||||
|
|
|
@ -740,5 +740,5 @@
|
||||||
"*://*.wallkit.net/*",
|
"*://*.wallkit.net/*",
|
||||||
"*://webcache.googleusercontent.com/*"
|
"*://webcache.googleusercontent.com/*"
|
||||||
],
|
],
|
||||||
"version": "3.1.0.1"
|
"version": "3.1.0.2"
|
||||||
}
|
}
|
||||||
|
|
4
sites.js
4
sites.js
|
@ -1469,9 +1469,9 @@ var defaultSites = {
|
||||||
domain: "estadao.com.br",
|
domain: "estadao.com.br",
|
||||||
block_regex: /(acesso\.estadao\.com\.br\/paywall\/.+\/.+\.js|cdn\.ampproject\.org\/v\d\/amp-(access|subscriptions)-.+\.js)/
|
block_regex: /(acesso\.estadao\.com\.br\/paywall\/.+\/.+\.js|cdn\.ampproject\.org\/v\d\/amp-(access|subscriptions)-.+\.js)/
|
||||||
},
|
},
|
||||||
"O Globo (& Valor Econômico; cached articles only)": {
|
"O Globo (& Valor Econômico)": {
|
||||||
domain: "globo.com",
|
domain: "globo.com",
|
||||||
block_regex: /\.tinypass\.com\//
|
block_regex: /(\.tinypass\.com\/|cdn\.cxense\.com\/|cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js)/
|
||||||
},
|
},
|
||||||
"Observador.pt": {
|
"Observador.pt": {
|
||||||
domain: "observador.pt",
|
domain: "observador.pt",
|
||||||
|
|
Loading…
Reference in a new issue