Cannot install my own chrome extension crx_magic_number_invalid

I made a simple chrome extension:

manifest.json:

{
  "name": "Layout VS Design",
  "version": "1",
  "description": "Enter the url of a image with your design at 100%",
  "background_page": "index.html",
  "browser_action": {
    "name": "Manipulate DOM",
    "icons": ["icon.png"],
    "default_icon": "icon.png"
  },
  "content_scripts": [ {
    "js": [ "jquery.min.js", "js.js" ],
    "matches": [ "http://*/*", "https://*/*"]
  }]
}

The fact is that chrome will not allow me to install it: enter image description here

Thing I have no idea where to set this number, Any idea what I can try?

+4
source share
2 answers

The first thing I see is that yours is background_pagenot formatted correctly. It should be

{ ...

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

If the file is manifest.jsonnot formatted correctly, Chrome will reject the extension.

You can read more about manifest formatting in the Google manifest file documentation .

Update

SO , Chrome " " .crx. , , .

  • manifest.json background.html ( )
  • chrome:extensions
  • , " "
  • " ..."
  • background manifest Chrome.
+6
  • (, )
  • ( , , )
  • .crx, chrome (, chrome://extensions/).
  • ( )

Chrome ,

+2

Source: https://habr.com/ru/post/1524660/


All Articles