antivenek

hecho por el otako de hispachan

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.

(У мене вже є менеджер скриптів, дайте мені встановити його!)

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         antivenek
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  hecho por el otako de hispachan
// @author       You
// @match        https://www.hispachan.org/*
// @grant        none
// ==/UserScript==

var paises;
paises=["https://www.hispachan.org/assets/countryballs/ve.png"];
    
    //hecho por el otako de hispachan

function sleep(ms) {
  return new Promise(resolve => setTimeout(resolve, ms));
}

function quitar(tipo){
    var ocultar=document.getElementsByClassName(tipo);
   var a=0;
    var b=0;
var c=0;

for(a=0;a<ocultar.length;a++){
 var banderita=ocultar[a].getElementsByClassName("bandera");
 for(b=0;b<banderita.length;b++){
     for(c=0;c<paises.length;c++){
     if(banderita[b].src==paises[c]){
         if(tipo=="reply"){
          ocultar[a].parentNode.parentNode.removeChild(ocultar[a].parentNode);
          }
         else{
             ocultar[a].parentNode.removeChild(ocultar[a]);
         }
          a--;
         break;
     }
 }

 }
}}



async function eventofun(x){

var respuestas=x.target.resp;

    toggleHiddenReplies(x.target.param1,x.target.param2);
await sleep(1000);
    quitar("reply");
}

var av=0;
    var prueba="";
    var param1=""
    var param2="";
var respuestas;
    quitar("reply");
    quitar("thread");
    var hiloboton=document.getElementsByClassName('expandirhilo');
    for(av=0;av<hiloboton.length;av++){
        prueba=hiloboton[av].getAttribute('onclick')
        prueba=prueba.split('(')[1].replace(')',''); //parametros
        prueba=prueba.split(' ').join(''); // espacios
        prueba=prueba.split('\'').join(''); // comillas
        param1=prueba.split(',')[0];
        param2=prueba.split(',')[1];
        respuestas=document.getElementById("hidden"+hiloboton[av].parentNode.parentNode.id);
        hiloboton[av].setAttribute( "onClick", "");
        hiloboton[av].addEventListener ("click", eventofun,false);
        hiloboton[av].param1=param1;
        hiloboton[av].param2=param2;
        hiloboton[av].resp=respuestas;
    }