Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
174 views
in Technique[技术] by (71.8m points)

How to port Chrome extension to Firefox addon?

I get this error in Firefox:

There was an error during the temporary add-on installation.
Error details ▼
File red_apples.zip does not contain a valid manifest

This is the extension I'm trying to port. Here's the manifest:

{
  "manifest_version": 2,
  "name": "Red Apples",
  "permissions": [
    "tabs", "activeTab"
  ],
  "background": {
    "persistent": false,
    "scripts": [
      "background.js"
    ]
  },
  "version": "0.0.0.2",
  "icons": {
    "16": "icon16.png",
    "48": "icon48.png",
    "128": "icon128.png"
  },
  "browser_action": {
    "default_icon": "icon16.png",
    "default_title": "Red Apples",
    "default_popup": "popup.html"
  },
  "content_scripts": [
    {
      "matches": [
        "<all_urls>"
      ],
      "js": [
        "script.js"
      ]
    }
  ]
}

At the bottom of this tutorial it says there's a 99% chance it works without modification, if it passes the test here. But it passes the test and still doesn't work.

I get the manifest error both for the version packed with Chrome, and for the version just compressed as .zip.

question from:https://stackoverflow.com/questions/65912642/how-to-port-chrome-extension-to-firefox-addon

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.9k users

...