Hi
I'm fairly new to creating extensions.
So far I've spent 3-4 days/week, and so far I've got it to display one thing on all URLs, but another information on a specified URL that matches.
in my manifest.json file i have:-
=========================
"content_scripts":[
{
"matches":["
https://www.myURL.com"],
"js":["content.js"]
}
],
"action": {
"default_popup": "hello.html",
"default_icon": "hello_extensions.png"
},
"permissions":["tabs"]
"background": {
"scripts": ["background/background.js"]
}
=========================
Now THIS does work, and the content.js file is going.. if it is on the specified URL.
hello.html displays on all other URLS.
PROBLEM:
when I'm adding my background.js file information to manifest, Manifest doesn't work.
ERROR;
Manifest is not valid JSON. Line: 22, column: 1, Syntax error.
LINE: "background": {
Can anyone assist with this?
Also - Once I get background going, is there a small tutorial on
a) loop through all the files being downloaded by the user.
b) if it is a json file, loop through the file for specified text.
I'm used to PHP, so these commands may be useful to me:
- preg_match, and - extract small information from LONG lines of text.
- save / store (and view) information into the app's memory (user's PC?)
Any guidance appreciated.