首页 > 解决方案 > 如何将 Chrome 扩展移植到 Firefox 插件?

问题描述

我在 Firefox 中收到此错误:

There was an error during the temporary add-on installation.
Error details ▼
File red_apples.zip does not contain a valid 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"
      ]
    }
  ]
}

教程的底部,它说如果通过这里的测试,它有 99% 的机会无需修改即可工作。但它通过了测试,仍然无法正常工作。

对于带有 Chrome 的版本和刚刚压缩为.zip.

标签: google-chrome-extensionfirefox-addon

解决方案


推荐阅读