burlesco/src/content.js

23 lines
766 B
JavaScript
Raw Normal View History

var code = null;
2016-11-30 18:17:54 -08:00
if (/([^\/].)?oglobo\.globo\.com/.test(document.location.host))
code = 'paywallAtivo = false;';
2016-11-30 18:17:54 -08:00
else if (/www\.economist\.com/.test(document.location.host))
code = 'document.cookie = "ec_limit=allow";';
2016-12-01 08:18:44 -08:00
else if (/foreignpolicy\.com/.test(document.location.host)) {
code = '\
2017-02-13 16:18:10 -08:00
document.getElementById("paywall_bg").remove();\
document.body.classList.remove("overlay-no-scroll");\
document.body.style.overflow = "visible";\
document.documentElement.classList.remove("overlay-no-scroll");\
';
2016-12-01 08:18:44 -08:00
}
2016-11-30 18:25:33 -08:00
if (code !== null) {
var script = document.createElement('script');
script.textContent = code;
(document.head||document.documentElement).appendChild(script);
script.parentNode.removeChild(script);
2016-11-30 18:17:54 -08:00
}