Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I change my "legacy packaged app" into an "extension"?

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.

like image 538
rolandnsharp Avatar asked Aug 25 '13 16:08

rolandnsharp


People also ask

What is a legacy packaged app?

A legacy packaged app is a web app that's bundled into a . crx file. In the past, legacy packaged apps could use most of the extension APIs, but since November 2012, the feature set of legacy packaged apps was reduced.

What is packaged apps?

Packaged apps are web apps with the look and feel of native apps. They are programmed using the same tools as web applications such as HTML5, Javascript, and CSS, but they run natively off of a user's Chromebook. They still run using Chrome, but they have access to Chrome APIs that traditional web apps do not.

What is a Chrome packaged app?

Types. Chrome apps can be hosted or packaged. Hosted apps have their background web pages on a remote server and the app acts like a bookmark or shortcut; packaged apps have off-line functionality making use of local storage.


1 Answers

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": {...},

  ...
like image 169
Vincent Scheib Avatar answered Sep 27 '22 18:09

Vincent Scheib