12343211234
12343211234

Reputation: 53

Fill in a form on a site with information that was saved beforehand?

so I'm working on an extension for Google Chrome for a friend. He wants it to fill out his shipping information when a checkout page is loaded with information filled out in a form beforehand. I've set up the form, and saved his information with the chrome.storage API. I can also track the URL that he is on with the tab API. The only thing I can't figure out is how to access the input fields of the page since it isn't my code. I can inspect the element and see the ID's, but since their page isn't linked to my JavaScript, I don't know how to get the strings in there. I've seen it done, and with this site too, but I can't find exactly how to do it. Can anyone nudge me in the right direction?

Upvotes: 0

Views: 56

Answers (1)

Xan
Xan

Reputation: 77541

A nudge, you say.

First, take a look at the Architecture Overview.

That will give you a hint that you need Content Scripts to interact with pages.

Then you may realize that you don't need to track tabs with tabs API - most likely just setting up a content script rule in the manifest is enough.

That should be enough for a nudge.

Upvotes: 1

Related Questions