I am new to chrome extensions so any help/advice is welcome. I would like to create an autofill chrome extension that fills in a form, only when on a certain page. How would I go about doing this? Thanks in advance.
Asked
Active
Viewed 88 times
-1
-
check url and load it dynamically http://ntt.cc/2008/02/10/4-ways-to-dynamically-load-external-javascriptwith-source.html – Arsen Mkrtchyan Mar 09 '14 at 22:24
2 Answers
3
Use a content script. This stuff is covered right at the beginning of the official docs.

Zig Mandel
- 19,571
- 5
- 26
- 36
2
In the manifest.json
file, add a.js
as a content script along with matches (the URLs on which this content script has to be loaded to be run in the context of the page) as follows :
"content_scripts": [
{
"matches": [
"http://www.example.com/*",
"http://www.example.com/pqr"
"js": [
"a.js"
]
}
]