Last active
August 29, 2015 13:57
-
-
Save mnn/9802932 to your computer and use it in GitHub Desktop.
Pop-up Ad Blocker for ads placed in state of "being almost inactive" on 000webhost.com (ads by Hosting24.com)
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
/* | |
Pop-up Ad Blocker for ads placed in state of "being almost inactive" on 000webhost.com (ads by Hosting24.com) | |
made by monnef | |
If you use this script you can still tell when you should log-in to prevent freezing your account. | |
(If you use blocking in .htaccess you cannot really tell, when it's active.) | |
The responsible script -> http://stats.hosting24.com/count.php | |
*/ | |
function markAdBlocked(str){ | |
jQuery("body").prepend("<div>ad blocked " + str + "</div>"); | |
} | |
function newAdRemover(){ | |
var adDiv = "#visas_style_div"; | |
if(jQuery(adDiv).length == 0){ | |
// not found | |
}else{ | |
jQuery(adDiv).remove(); | |
if(jQuery(adDiv).length == 0){ | |
jQuery(".__bPopup1").remove(); | |
markAdBlocked(""); | |
} | |
} | |
} | |
jQuery(document).ready(function(){ | |
setTimeout(newAdRemover, 1); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment