Reputation: 657
Working on a Chrome extension and creating a manifest.json file
Based on the Chrome documents the "start_url" exists (and is documented) https://developers.google.com/web/fundamentals/web-app-manifest/#start-url
But I'm getting the error "Unrecognized manifest key 'start_url'". Obviously, I can remove that key and 'fix' the error, but I want the ability to 'tell the browser where your application should start when it is launched...direct the user straight into your app, rather than a product landing page. Think about the what the user will want to do once they open your app, and place them there" (which is what the start_url key is supposed to do)
Is there another way to achieve this that isn't documented? Is my syntax wrong somehow?
{
"start_url": "/start", // the page I want the app to open on
"manifest_version": 2,
"name": "My Extension",
"description": "A fantastic extension",
"short_name": "Extension",
"version": "1.0",
"background": {
"scripts": [
"events.js"
],
"persistent": true
},
"browser_action": {
"default_popup": "index.html",
"default_title": "Extension"
},
"content_scripts": [
{
"matches": ["*://*/*"],
"css": [],
"js": ["content.js"]
}
]
}
Upvotes: 2
Views: 13026
Reputation: 177500
A progressive web app is not the same thing as an extension; they're different in every way imaginable, including the manifest.
Here's the Manifest File Format for extensions.
Furthermore, a Chrome extension isn't "launched" like you would an app — it has several entry points that can be activated at various times, like clicking on the browser action to open a popup, or a context menu item, or a content script that runs on certain pages, or a background page that opens a tab in response to certain conditions.
Upvotes: 1