【问题标题】:How to migrate manifest version 2 'options' to v3 for chrome extension?如何将清单版本 2“选项”迁移到 v3 以进行 chrome 扩展?
【发布时间】:2021-09-16 00:19:06
【问题描述】:

我不知道如何将带有选项页面的 chrome 扩展清单 v2 升级到 v3。我收到错误The chrome_style option cannot be used with manifest version 3.

我查了https://developer.chrome.com/extensions/migrating_to_manifest_v3,但没有提到这个。

知道我的清单中需要更改什么:-

//Manifest v2
"options_ui": {
        "chrome_style": true,
        "page": "options.html",
        "open_in_tab": false
},

解决方案: 按照建议,我删除 "chrome_style": true, 后就可以了

【问题讨论】:

  • 我很确定“chrome_style”已被弃用。
  • 删除"chrome_style": true,

标签: google-chrome-extension options


【解决方案1】:

将您的代码替换为:

// Manifest v3
{
  "options_page": "options.html"
}

【讨论】:

  • 他为什么要那样做? V3 仍然允许options_ui
猜你喜欢
  • 2020-11-28
  • 2021-03-26
  • 1970-01-01
  • 2012-08-02
  • 2012-08-02
  • 2021-09-30
  • 2021-09-21
  • 2022-10-20
  • 2012-09-03
相关资源
最近更新 更多