-
-
Save sdbruder/4684466 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name remove folha's paywall | |
// @namespace http://folha.uol.com.br/ | |
// @version 0.1 | |
// @description just remove folha's paywall | |
// @include http://*.folha*/* | |
// @match http://*.folha*/* | |
// @include http://*.blogfolha*/* | |
// @match http://*.blogfolha*/* | |
// @copyright 2012+, Me | |
// ==/UserScript== | |
var killed = false; | |
function killpaywall() { | |
var body = document.getElementsByTagName("body")[0]; | |
if (body) { | |
body.style.overflow = "scroll"; | |
window.onscroll = null; | |
} | |
var paywall = document.getElementById("paywall"); | |
if (paywall) { | |
paywall.parentNode.removeChild(paywall); | |
killed = true; | |
} | |
if (!killed) { | |
setTimeout(killpaywall, 500); | |
} | |
} | |
unsafeWindow.folha.refresh.now = function() { | |
console.log("Kill F*cking refresh!"); | |
} | |
killpaywall(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment