Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

187
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!