阅读清单:错误处理options_page:在WebExtension

时间:2019-09-03 09:55:25

标签: javascript google-chrome-extension firefox-addon firefox-webextensions

当尝试在mozilla firefox中加载chrome扩展名时。我有错误:

  

正在读取清单:处理options_page时出错:意外   在WebExtension阅读清单中找到属性:错误   处理options_page:在   WebExtension清单。

{
  "name": "EXTENSION",
  "options_page": "options.html",
  "background": {
    "page": "background.html"
  },
  "browser_action": {
    "default_popup": "popup.html",
    "default_icon": "icon-34.png"
  },
  "commands": {
    "_execute_browser_action": {
      "suggested_key": {
        "default": "Ctrl+A"
      }
    }
  },
  "icons": {
    "128": "icon-128.png"
  },
  "permissions": [
   "https://*/",
   "http://*/"
  ],
  "version": "1.0",
  "manifest_version": 2,
  "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'"
}

1 个答案:

答案 0 :(得分:0)

“此清单密钥已被弃用。请改为使用options_ui。”

 "options_ui": {
    "page": "options.html",
    "open_in_tab": false
  },

参考:

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/options_ui

https://developer.chrome.com/extensions/options