NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name UTP MX // @namespace http://tampermonkey.net/ // @version 0.1 // @description Lista de eventos // @author UTP MX // @license MIT // @match https://utproducts.com/current-events/ // @grant GM_addStyle // @require http://code.jquery.com/jquery-3.3.1.min.js // ==/UserScript== ( function() { function seleccionarCuartos(){ var cuartos = Ul.getElementsByTagName('li'); for(var i = cuartos.length - 2; i >= 0; i--){ for(var j = CuartosOficina.length -1; j >= 0; j--){ if(Ul.children[i].children[0].children[1].innerHTML.indexOf(CuartosOficina[j]) > -1){ //console.log(Ul.children[i].children[0].children[1].innerHTML); CuartosSeleccionados.push(i); } } } } var CuartosSeleccionados=[]; var CuartosOficina=['#764','#769','#770','#773','#774','#775','#776','#786']; var ids=[]; var existentes=[]; var listas=[]; var count=[]; var Ul = document.getElementsByClassName("lists-collection")[0]; seleccionarCuartos(); //console.log(Ul); for (var i = CuartosSeleccionados.length - 1; i >= 0; i--) { Ul.children[CuartosSeleccionados[i]].className+=" TeamIvan"; var id=Ul.children[CuartosSeleccionados[i]].children[0].getAttribute("data-listid"); ids.push(id); var elemento=document.getElementById("list-"+id).children[1].children[1].children[0]; listas.push(elemento); count.push(elemento.childElementCount); } //console.log(listas); //console.log(count); GM_addStyle ( ` .TeamIvan { Font-size: larger; border: black 1px dashed; font-weight: 900; background:#FEF0E9 !important; } ` ) var Ti = document.getElementsByClassName("TeamIVan"); console.log(Ti); })();