Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7415829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:22:35+00:00 2026-05-29T07:22:35+00:00

So, I have a chrome extension that does various things to a site. What

  • 0

So, I have a chrome extension that does various things to a site.
What I would like to do is rewrite it, to make it cleaner and more relevant, so I started. I have what content script, and it is ‘infuse.js’ which injects another file t3.js, into the website.

My question is – is there any way to pass data from localStorage to t3.js?

I have sendRequest and a response set up, so infuse.js can read the storage, but, if I try to do a sendRequest from t3.js, it obviously comes up as undefined as it isn’t a content script, and thusly does not have access the API.

Let me know if you know anything.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T07:22:36+00:00Added an answer on May 29, 2026 at 7:22 am

    There’s something on this in the docs….
    http://code.google.com/chrome/extensions/content_scripts.html#host-page-communication

    Also, if you want to pass something to t3.js only once when its injected, then you can inject some js that sets some values, before injecting t3.js.

    settings={1:"something'set'",2:["blek",1,2,3]}; //Youd get these from localStorage or something
    
    head = document.getElementsByTagName('head')[0],
    script = document.createElement('script');
    
    script[script.innerText ? 'innerText' : 'textContent'] = 'var settings=' + JSON.stringify(settings)+ ';';
    
    head.appendChild(script);
    
    //Then inject t3.js
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making a Google Chrome extension and I would like to have my
I have this Chrome extension that modifies the header of requests before sending them.
I have a chrome extension that uses the facebook Graph API Because its a
Suppose we have Chrome extension, that uses background page, popup page, maybe some other
In my popup.html in my chrome extension I have a button that will get
I have a background page in a Chrome extension that makes requests to a
I have a Chrome extension that has some links in it. Currently when clicked
I'm trying to build a Chrome extension that will have a heavy use of
I have a Chrome extension with a browser action that is trying to imitate
I am making a chrome extension and I have a popup.html page that contains

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.