Last active
June 19, 2016 23:26
-
-
Save devmessias/36574fdf10dd6690200ba93096000783 to your computer and use it in GitHub Desktop.
This file contains 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 kill folha ad-blocker kill | |
// @version 0.0.1 | |
// @namespace https://github.com/devmessias | |
// @include http://www1.folha.uol.com.br/* | |
// @match http://*.folha.uol.com.br/* | |
// @match https://*.folha.uol.com.br/* | |
// @grant none | |
// @run-at document-start | |
// ==/UserScript== | |
window.addEventListener('beforescriptexecute', function(e) { | |
for (i = 0; i < document.getElementsByTagName('script').length; i++) { | |
var scriptTagHasAdBlock = document.getElementsByTagName("script")[i].innerHTML.indexOf('paywall')>=0; | |
if (scriptTagHasAdBlock) { | |
e.stopPropagation(); | |
e.preventDefault(); | |
// window.removeEventListener(e.type, arguments.callee, true); | |
} | |
} | |
}, true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment