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

174
Visualizações
How to inject some dynamic elements into a webpage with a chrome extension?

I'm developing a chrome extension similar to Grammarly. I see that Grammarly is injecting its G button into the textbox of all the web pages. As in this pic: G button inside textbox in the bottom right corner

How do they do it? I tried to add a div using the content script but some pages still preventing it from displaying. Here is what I tried(testing purpose):

let div = document.createElement('div');
  div.innerHTML = "<strong>Hi there!</strong> You've read an important message.";

  document.body.append(div);

So, how does Grammarly achieve that functionality? How to do it with the react-shadow package? or any other workaround to do it in React? I used shadow-dom but it is blocking the entire dom. And displaying the latest element. Of course, I don't want that effect. How to exactly implement like Grammarly did?

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