galch24 / Yandex Ad Remover Beta

// ==UserScript==
// @name           Yandex Ad Remover Beta
// @description    Removes annoying yandex.ru animated and context adverts in mail.yandex
// @author         Galchonok
// @include        http://mail.yandex.ru/*
// @include        https://mail.yandex.ru/*
// @version        0.1
// @copyright      2014, Golanova Galina
// @oujs:author galch24
// ==/UserScript==

//Yandex mail have no Parent Element To animated and context adverts

//Parent Element To animated and context adverts
grandparent = document.getElementByClass('b-page');
var removeYaAdverts = function(){
//Yandex Adverts
document.getElementById('js-main-rtb').style.visibility = 'hidden'; 
document.getElementById('js-main-rtb').style.display = 'none';

}
//Below function happens whenever the contents of 
//grandparent change
grandparent.addEventListener("DOMSubtreeModified", removeYaAdverts, true);
//fires off the function to start with
removeYaAdverts();