2017-02-13 18:40:59 -08:00
|
|
|
// run_at: document_idle
|
2018-05-24 16:14:55 -07:00
|
|
|
const ABRIL_CODE = `
|
2020-09-20 10:01:27 -07:00
|
|
|
window.setTimeout(function() {
|
|
|
|
document.querySelector('body').classList.remove('disabledByPaywall')
|
|
|
|
document.querySelector('.piano-offer-overlay').remove()
|
|
|
|
document.querySelector('#piano_offer').remove()
|
|
|
|
}, 10000)
|
2018-05-24 16:14:55 -07:00
|
|
|
`;
|
|
|
|
|
2018-05-08 14:59:04 -07:00
|
|
|
const INJECTION = {
|
2019-07-02 18:24:29 -07:00
|
|
|
correio24horas: {
|
|
|
|
url: /correio24horas\.com\.br/,
|
|
|
|
code: `
|
|
|
|
jQuery('[class^=paywall]').remove();
|
|
|
|
jQuery('[class$=blocked]').removeClass();
|
|
|
|
jQuery('[id^=paywall]').removeClass('hide').removeClass('is-active');
|
|
|
|
jQuery('.noticias-single__content__text').attr('style', 'height:auto;');
|
|
|
|
jQuery('[id^=paywall]').remove();
|
|
|
|
`
|
|
|
|
},
|
2018-12-21 14:27:18 -08:00
|
|
|
diariodaregiao: {
|
|
|
|
url: /diariodaregiao\.com\.br/,
|
|
|
|
code: `
|
|
|
|
document.getElementsByClassName('noticia-texto')[0].style.display = 'block';
|
|
|
|
document.querySelector('.conteudo > .row').style.display = 'none';
|
|
|
|
`
|
|
|
|
},
|
2018-05-24 16:14:55 -07:00
|
|
|
exame: {
|
2020-09-20 09:00:48 -07:00
|
|
|
url: /exame\.com\.br/,
|
2018-05-24 16:14:55 -07:00
|
|
|
code: ABRIL_CODE
|
|
|
|
},
|
2018-05-08 14:59:04 -07:00
|
|
|
folhadespaulo: {
|
|
|
|
url: /folha.uol.com.br/,
|
|
|
|
code: `
|
|
|
|
omtrClickUOL = function(){};function showText() {
|
|
|
|
$("#bt-read-more-content").next().show();
|
|
|
|
$("#bt-read-more-content").next().show().prev().remove();
|
|
|
|
}
|
|
|
|
setTimeout(showText, 100);
|
|
|
|
`
|
|
|
|
},
|
2020-07-25 07:35:11 -07:00
|
|
|
nexo: {
|
|
|
|
url: /nexojornal\.com\.br/,
|
|
|
|
code: `
|
|
|
|
const selectors = [
|
|
|
|
"div[class*='PaywallBumper__wrap-container'",
|
|
|
|
"div[class*='Datawall__wrap-container'"
|
|
|
|
]
|
|
|
|
|
|
|
|
selectors.forEach(selector => {
|
|
|
|
const element = document.querySelector(selector)
|
|
|
|
if (element) element.remove()
|
|
|
|
})
|
|
|
|
`
|
|
|
|
},
|
2020-10-25 12:07:33 -07:00
|
|
|
seudinheiro: {
|
|
|
|
url: /seudinheiro.com/,
|
|
|
|
code: `
|
|
|
|
document.querySelector('#premium-paywall').remove()
|
|
|
|
document.body.style.overflow = ''
|
|
|
|
`
|
|
|
|
},
|
2018-05-08 16:44:08 -07:00
|
|
|
superinteressante: {
|
|
|
|
url: /super.abril.com.br/,
|
2018-05-24 16:14:55 -07:00
|
|
|
code: ABRIL_CODE
|
2018-05-08 16:44:08 -07:00
|
|
|
},
|
2018-05-08 14:59:04 -07:00
|
|
|
veja: {
|
|
|
|
url: /veja.abril.com.br/,
|
2018-05-24 16:14:55 -07:00
|
|
|
code: ABRIL_CODE
|
2018-05-11 09:33:01 -07:00
|
|
|
},
|
2018-07-14 19:51:26 -07:00
|
|
|
jota: {
|
|
|
|
url: /jota.info/,
|
|
|
|
code: `
|
|
|
|
document.getElementsByClassName('jota-paywall')[0].remove();
|
|
|
|
`
|
2018-09-04 19:34:36 -07:00
|
|
|
},
|
2021-01-08 10:13:03 -08:00
|
|
|
observador: {
|
|
|
|
url: /observador.pt/,
|
|
|
|
code: `
|
2021-01-08 10:16:40 -08:00
|
|
|
if (!document.body.classList.has(`premium-article`))
|
2021-01-08 10:13:03 -08:00
|
|
|
return;
|
|
|
|
document.body.classList.remove(`premium-article`);
|
|
|
|
const paywall = document.querySelector(`.premium-paywall`);
|
|
|
|
paywall.parent.removeChild(paywall);
|
|
|
|
document.querySelector(`.article-body-wrapper`).style.maxHeight = `inherit`
|
|
|
|
`
|
|
|
|
}
|
2018-05-08 14:59:04 -07:00
|
|
|
};
|
2016-11-30 18:17:54 -08:00
|
|
|
|
2018-05-08 14:59:04 -07:00
|
|
|
chrome.storage.local.get('sites', function(result) {
|
|
|
|
for (let site in INJECTION) {
|
|
|
|
let enabledSites = result.sites;
|
|
|
|
if (enabledSites && enabledSites[site] == false)
|
|
|
|
continue;
|
|
|
|
if (INJECTION[site] == undefined)
|
|
|
|
continue;
|
2016-05-21 15:05:04 -07:00
|
|
|
|
2018-05-08 14:59:04 -07:00
|
|
|
if (INJECTION[site].url.test(document.location.host)) {
|
|
|
|
var script = document.createElement('script');
|
|
|
|
script.textContent = INJECTION[site].code;
|
|
|
|
(document.head||document.documentElement).appendChild(script);
|
|
|
|
script.parentNode.removeChild(script);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|