Reputation:
So, I've been working on a small Google Chrome extension that replaces some words with other words, but when I try to load the extension, Google tells me that there is a "Manifest is not valid JSON. Line: 12, column: 2, Unexpected data after root element." error, and I cannot fix it. Thanks!
//credit goes to /u/adamrsb48
{
"manifest_version": 2,
"name": "Random Plugins",
"version": "0.1"
"background": {
"scripts": ["background.js"],
"persistent": false
}
"content_scripts": [
{
"matches": ["http://*/*", "https://*/*"],
"js": ["plugins.js"]
}
]
}
Upvotes: 0
Views: 4163
Reputation: 186
you are missing ,
some where
i fixed it for you
{
"manifest_version": 2,
"name": "Random Plugins",
"version": "0.1",
"background": {
"scripts": ["background.js"],
"persistent": false
},
"content_scripts": [{
"matches": ["http://*/*", "https://*/*"],
"js": ["plugins.js"]
}]
}
you can use this to check valid JSON
Upvotes: 0
Reputation: 169
You're missing two commas; after "version": "0.1" and after "background": {...}
Try this:
{
"manifest_version": 2,
"name": "Random Plugins",
"version": "0.1",
"background": {
"scripts": [
"background.js"
],
"persistent": false
},
"content_scripts": [
{
"matches": [
"http://*/*",
"https://*/*"
],
"js": [
"plugins.js"
]
}
]
}
Upvotes: 2