Firefox插件上传说我的ID与正则表达式不匹配,但确实如此

Firefox addon upload says my ID does not match regular expression but it does

提问人:micah 提问时间:10/29/2023 更新时间:10/30/2023 访问量:22

问:

尝试使用清单 v3 创建扩展。按照指南,它说我需要在 中提供 UUID。我在这里做到了: 'browser_specific_settings.gecko

{
    "manifest_version": 3,
    ...
    "icons": {
      "48": "images/icon-48.png",
      "128": "images/icon-128.png"
    },
    "browser_specific_settings": {
        "gecko": {
            "id": "7e08ead6-7844-4272-8140-4875a3b8ab5d"
        }
    },      
    "content_scripts": [ ... ]
  }

但要得到以下几点:

invalid uuid

我错过了什么?

火狐 firefox-addon

评论


答:

0赞 evilpie 10/29/2023 #1

你需要将你的 GUID 括在大括号中,如第一个 RegExp 所示,或记录在 MDN 上的扩展 ID 格式下。 因此,正确的代码如下所示:{}

    "browser_specific_settings": {
        "gecko": {
            "id": "{7e08ead6-7844-4272-8140-4875a3b8ab5d}"
        }
    }

就我个人而言,我还建议使用“电子邮件”格式,它更友好,更容易与扩展相关联。