Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

191
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda