Last active
August 29, 2015 14:03
-
-
Save Galch24/2336f584f485f066f98d 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 Mail Ad Remover Beta | |
// @description Removes annoying Mail.ru animated and context adverts | |
// @author Galchonok | |
// @include http://e.mail.ru/* | |
// @include https://e.mail.ru/* | |
// @version 1.3 | |
// ==/UserScript== | |
//Parent Element To animated and context adverts | |
grandparent = document.getElementById('ScrollBodyInner'); | |
var removeMailAdverts = function(){ | |
//Mail Adverts | |
document.getElementById('slot-container_2').style.visibility = 'hidden'; | |
document.getElementById('slot-container_2').style.display = 'none'; | |
document.getElementById('rb-context-left-slots').style.visibility = 'hidden'; | |
document.getElementById('rb-context-left-slots').style.display = 'none'; | |
document.getElementById('getmov230935510').style.visibility = 'hidden'; | |
document.getElementById('getmov230935510').style.display = 'none'; | |
document.getElementById('b-slot_left_direct').style.visibility = 'hidden'; | |
document.getElementById('b-slot_left_direct').style.display = 'none'; | |
}; | |
//Below function happens whenever the contents of | |
//grandparent change | |
grandparent.addEventListener("DOMSubtreeModified", removeMailAdverts, true); | |
//fires off the function to start with | |
removeMailAdverts(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment