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

177
Views
Uniquely select node with class/id

I'm making a webbrowser extension. The ultimate goal of this would be to select an element that we don't wanna see in a webpage. My extension would remove it from the page (graphically) and would save a way to hide it every time you open up the page.
I've already done the part to select an element in the page and adding display: none to it. But now I need a way to save which node was hidden in order to hide it the next time this url is loaded.
I've inspected some major sites in order to see what's the best way to do this. And for now, I've figured out that I'll do it either with an id if the element has one or with his class list. Linked with the website url, this could work.
But I've alos figured out that this will bring me many problems.

  • What if the element has not a unique classlist.
  • What if the classlist changes in function of the state of the website
  • ...

And I'm not even talking about the website like google which encrypt and change their classes/id every now and then

So I feel like they should be an easier way to do this and I'm completly missing it. I've searched for a solution but I can't find a solution to this as searching for "chrome extension uniquely identify node with class/id", "chrome extension uniquely identify node" or "chrome extension save node" will get result polluted with nodejs.

In summary, in need a way to identify any node from the chrome extension

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!