Created
August 14, 2017 03:11
-
-
Save gosukiwi/b185c3bd4978418985e69fd8fd750501 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 No me jodas Clarin | |
// @namespace gosukiwi.greasemonkey.nmjc | |
// @description Borra el overlay de mierda que pone Clarin para que te registres | |
// @include https://www.clarin.com/* | |
// @include https://clarin.com/* | |
// @version 0.0.1 | |
// @grant none | |
// ==/UserScript== | |
var MAX_TRIES = 15; | |
var tries = 0; | |
function checkForOverlay() { | |
var $wrap = $('.mfp-wrap'); | |
setTimeout(function () { | |
if ($wrap.length > 0) { | |
$wrap.hide(); | |
$('.mfp-bg').trigger('click'); | |
} else if (tries < MAX_TRIES) { | |
tries = tries + 1; | |
checkForOverlay(); | |
} | |
}, 500); | |
} | |
checkForOverlay(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment