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

160
Visualizações
Chrome Extension - Saving just the text from a web element as a variable

The GitHub: https://github.com/TDev-Inquire/gsxintegration

I'm having trouble trying to make a chrome extension to copy certain web elements as a variable onto chrome storage and then dumping them into the respective places on the other website. Name, address, phone number, etc. Basically a web scraper/paster.

I found a useful method and tried to redo it to work for me but now I'm stuck, pressing the secondary button only fills in the input box with "undefined"

content_nomsg.js

var cx_name = document.getElementById("custh1").value;


console.log("source page ran");

var storArray = {
    cx_name: "cxname",
   
    ///cx_problem: cxprblm,
    ///integ_id: intid
    };


chrome.storage.local.set({
        'newStorage': storArray
        }); 

content2.js

console.log("target content2 ran");

var storedLegal = chrome.storage.local.get('newStorage', function (items) {
    console.log(items); 

    document.querySelector("#home-search__textbox").value = items.newStorage.cxname;
    ///document.getElementById("lastName").value = items.newStorage.src_lname; 
  });

Thank you so much! Im really hoping I just missed something but I really am stuck.

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