burlesco/src/content.js

20 lines
701 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)) {
2016-11-30 18:25:33 -08:00
code = 'window.FPMarketingSettings.__meta.disable_paywall = true;';
2016-12-01 08:18:44 -08:00
code += 'window.Drupal.settings.ec_wallpage.ec_wallpage_paywall_name = ' +
'"article paywall registered"';
}
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
}