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

183
Vistas
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
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