levelKro / Yahoo Mail - No More Ads

// ==UserScript==
// @name         Yahoo Mail - No More Ads
// @namespace    https://levelkro.net
// @version      0.3
// @description  Remove ads from main content
// @author       levelKro (https://levelkro.com)
// @match        https://mail.yahoo.com/*
// @grant        none
// @license MIT
// @updateURL https://openuserjs.org/meta/levelKro/Yahoo_Mail_-_No_More_Ads.meta.js
// @copyright 2018, levelKro (https://levelkro.com) (https://openuserjs.org/users/levelKro)
// ==/UserScript==

var srch_style="position: absolute; left: 0px; top: 0px; visibility: visible; width: 100%; height: 100%; background-color: rgb(255, 255, 255); z-index: 50; display: block;";
setInterval(function(){
    var box_main=document.getElementById("mail-app-component");
    var box_child=box_main.children;
    var box_child_obj=Object.values(box_child);
    box_child_obj.forEach(function(item,id,arr) {
        if(document.getElementById("mail-app-component").children[id].style.backgroundColor=="rgb(255, 255, 255)" && document.getElementById("mail-app-component").children[id].className==""){
            item.innerHTML = "";
            item.style="";
            console.log("Yahoo Mail - Main content ads found and removed.");
        }
    });
    if(document.getElementById("boxSKY")) document.getElementById("boxSKY").innerHTML="";
    if(document.getElementById("slot_LREC")) document.getElementById("slot_LREC").innerHTML="";
    if(document.getElementById("slot_LREC4")) document.getElementById("slot_LREC4").innerHTML="";

}, 500);