7

I have looked at the Google documentation but I can't see how to change its type.

This is the error I get on loading.

There were warnings when trying to install this extension: 'browser_action' is only allowed for extensions, and this is a legacy packaged app.

This is my manifest.json.

{
  "name": "first app",
  "description": "this is my first app",
  "version": "1.4",  
  "manifest_version": 2,

  "content_security_policy": "script-src 'self' https://en.wiktionary.org/; object-src 'self'",


  "background": {
    "page": "background.html"
  },

"app": {
    "launch": {
      "local_path": "index.html"    

    }
  },

  "browser_action": {
    "default_icon": "icon.png"
  },

  "icons": {
    "128": "icon.png",
    "16": "icon.png"
  },
  "permissions": [  
    "http://*/*", 
    "https://*/*", 
    "https://en.wiktionary.org/",
    "http://en.wiktionary.org/",
    "tabs",
    "contextMenus",
    "storage",
    "unlimitedStorage",
    "notifications"]

}

All I have is a right-click event at any-time while browsing and store that text for viewing on a main page. I added in the "browser_action" as the chrome store isn't alowing me to upload my extension as a "legacy packaged app", but I don't really understand what that is even after reading the documentation.

rolandnsharp
  • 281
  • 1
  • 4
  • 13
  • 1
    It's unclear what you're trying to accomplish because you haven't included the rest of the code, but the "app" dictionary in your manifest makes it an app. Remove that. Then compare your extension to the "Getting Started" Chrome extension: http://developer.chrome.com/extensions/getstarted.html – sowbug Aug 26 '13 at 02:57

1 Answers1

12

For an app use a manifest that looks like:

{
  // Required
  "app": {
    "background": {
      // Optional
      "scripts": ["background.js"]
    }
  },
  "manifest_version": 2,
  "name": "My App",
  "version": "versionString",

  ...

For an extension use

{
  // Required
  "manifest_version": 2,
  "name": "My Extension",
  "version": "versionString",

  // Recommended
  "default_locale": "en",
  "description": "A plain text description",
  "icons": {...},

  // Pick one (or none)
  "browser_action": {...},
  "page_action": {...},

  ...
Vincent Scheib
  • 17,142
  • 9
  • 61
  • 77
  • Here is a basic manifest for a hosted app: https://computers.tutsplus.com/tutorials/quick-tip-make-a-chrome-app-shortcut-for-any-web-app--cms-21221 – Elad Nava Sep 24 '16 at 22:44