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

179
Visualizações
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 à 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