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

155
Views
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
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!