Mail Ad Remover Beta

Removes annoying Mail.ru animated and context adverts

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==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
// @namespace https://greasyfork.org/users/3077
// ==/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();