Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

188
Vistas
Hide div in Chrome Extension

I'm following this video (https://www.youtube.com/watch?v=rymG9UmPuhM&t=535s) to create a chrome extension that looks to see if there is a specific word (or words) on the home page of youtube and then it hides the video thumbnail and title. So far with the tutorial I was able to get the title hidden, but I'm having a hard time selecting the thumbnail and changing that style.

I've found that if I were to ascend the DOM three divs to #dismissible, I could just use css to blur that entire div, but I'm having a hard time selecting that div through jquery.

I'm new to this, but here's where I'm at so far:

replaceText(document.body)

function replaceText(element) {
    if (element.hasChildNodes()) {
        element.childNodes.forEach(replaceText)
        } else if (element.nodeType === Text.TEXT_NODE) {
            if (element.textContent.match(/make/gi)) {
                element.parentElement.style.color = 'black'
                element.parentElement.style.backgroundColor = 'black'
            }
            // element.textContent = element.textContent.replace(/make/gi, 'SPOILER')
    }
}
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda