Converting Chrome app manifest from V1 to v2 - json

I have made a chrome app in manifest version 1 with the code :
{
"name": "J-Tech",
"version": "2",
"icons": { "128": "icon.png" },
"app": {
"urls": [
"http://www.j-tech-web.co.uk"
],
"launch": {
"web_url": "http://www.j-tech-web.co.uk"
}
}
}
I can't find a tutorial to make it take me the my website, can anyone tell me how

This should work
{
"name": "J-Tech",
"description": "sample Text",
"version": "2",
"manifest_version": "2",
"icons":
{
"128": "icon.png"
},
"app":
{
"urls":
[
"http://www.j-tech-web.co.uk"
],
"launch":
{
"web_url": "http://www.j-tech-web.co.uk"
}
},
"permissions":
[
]
}

Related

Invalid value for 'background.service_worker'. Could not load manifest

I am trying to migrate/update a manifest 2 file to manifest 3. But I am getting the following error Invalid value for 'background.service_worker'. Could not load manifest.
From the original maifest 2 file I removed "persistent": true and changed "background": {"scripts": ["background.js", "worker.js"], to be "background": {"service_worker":["background.js", "worker.js"],
My full code for v3 can be seen below:
{
"manifest_version": 3,
"name": "Chrome ext",
"description": "This is an extension ",
"version": "1.1.1",
"icons": {
"128":"icon.png"
},
"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html",
"default_title": "Open ext"
},
"options_page": "options.html",
"background": {
"service_worker": ["background.js", "worker.js"]
},
"permissions": [
"tabCapture",
"downloads",
"storage"
],
"commands": {
"start": {
"suggested_key": {
"default": "Ctrl+Shift+S",
"mac": "Command+Shift+U"
},
"description": "Start"
},
"stop": {
"suggested_key": {
"default": "Ctrl+Shift+X",
"mac": "MacCtrl+Shift+X"
},
"description": "Stop"
}
}
}

No inspect views option on my Chrome extension manifest v3

I don't have the inspect views option on my google chrome extension that I am working on.
And this is my manifest.json
{
"name": "hoko's ext",
"description": "my ext",
"version": "1.0",
"manifest_version": 3,
"action": {
"default_popup": "popup.html"
},
"permissions": [
"activeTab"
],
"background": {
"service-worker": "background.js",
"type": "module"
},
"content_scripts": [
{
"matches": ["https://*/*"],
"js": ["content.js"]
}
]
}

my manifest.json file contains an error that I can't find

I'm writing a very simple Chrome extension and when I try to load it as an unpacked extension, I get the following error:
Manifest is not valid JSON. Line: 16, column: 2, Syntax error.
{
"manifest_version": 2,
"name": "Backchannel",
"description": "",
"version": "1.0",
"icons": {
"128": "128.png"
},
"app": {
"urls": [
"http://backchannel.glitch.me/"
],
"launch": {
"web_url”: “http://backchannel.glitch.me/"
}
},
"permissions": [
"unlimitedStorage",
"notifications"
]
}

alert/confirm doesn't work in chrome app - missing config?

I made a chrome app to display my web by webview tag, but the js API alert()/confirm() doesn't work. That made me wondering. Chrome app needs to config something to support confirm?
this is my manifest.json:
{
"app": {
"background": {
"scripts": ["background.js"]
}
},
"manifest_version": 2,
"name": "Performance Monitor",
"version": "1.0",
"description": "A performance monitor to show cpu and memory status.",
"icons": {
"16": "img/ccloud.png",
"48": "img/ccloud.png",
"128": "img/ccloud.png"
},
"permissions": [
"webview"
],
"webview": {
"partitions": [
{
"name": "static",
"accessible_resources": ["header.html", "footer.html", "static.png"]
},
{
"name": "trusted*",
"accessible_resources": ["local_*.html", "*.png", "*.js"]
},
{
"name": "trusted-audio",
"accessible_resources": ["*.mp3"]
}
]
}
}

Can someone correct my Json Code ?

I'm trying to do a Extension for Google Chrome and I receive the error : Unexpected Token
Thanks to everyone who will reply :D
http://i.gyazo.com/0e435fdc4d9432789834560a594480ab.png
This is my code :
}
“manifest_version”: 2,
“name”: “tf1“,
“description”: “La chaine TF1 en direct“,
“version”: “1.0″,
“icons”: {
“128″: “128.png”
},
“app”: {
“urls”: [
"http://www.tf1.fr/live/"
],
“launch”: {
“web_url”: “http: //www.tf1.fr/live/”
}
},
“permissions”: [
"unlimitedStorage",
"notifications"
]
}
Well, it should open with { instead of }.
Your JSON should begin with a {
The quote characters seem like they were copied from somewhere. The JSON linter did not recognize it to be a valid quote character.
Fixing both:
{
"manifest_version": 2,
"name": "tf1",
"description": "LachaineTF1endirect",
"version": "1.0",
"icons": {
"128": "128.png"
},
"app": {
"urls": [
"http://www.tf1.fr/live/"
],
"launch": {
"web_url": "http: //www.tf1.fr/live/"
}
},
"permissions": [
"unlimitedStorage",
"notifications"
]
}
When you are not sure if your JSON is correctly formed, use this tool - JSONLint. It tells you why your JSON is malformed.
JSON should be opened with { and closed with }.
I think your problem is in quotes symbols.
You have to use ", but you using “. I am not sure it is correct.
I assume, this will work:
{
"manifest_version": 2,
"name": "tf1",
"description": "La chaine TF1 en direct",
"version": "1.0",
"icons": {
"128": "128.png"
},
"app": {
"urls": [
"http://www.tf1.fr/live/"
],
"launch": {
"web_url": "http: //www.tf1.fr/live/"
}
},
"permissions": [
"unlimitedStorage",
"notifications"
]
}
You can try it here: http://jsonlint.com/