My understanding of adding new permissions, matches, or host permissions to your chrome extension's manifest is that it will automatically disable the extension for any current users, until they have had a chance to view and accept the new permissions (and it doesn't seem to do much to notify them, it just disables the extension).

However, I found this answer which says that if you are simply adding a host permission to include something already covered in your content script matches, that it may not trigger a new warning.

Testing with getPermissionWarningsByManifest seems to confirm that it does not trigger any new installation warnings, but does anyone know if it also does not auto-disable the extension?

For illustration, I would be updating this:

{
    "manifest_version": 3,
    "name": "extension name",
    "description": "extension description.",
    "permissions": ["activeTab", "storage", "tabs", "scripting"],
    "content_scripts": [
      {
        "matches": ["*://www.examplewebsite.com/*"],
        "js": ["content.js"],
      }
    ],
    "background": {
      "service_worker": "background.js"
    },
}

To this:

{
    "manifest_version": 3,
    "name": "extension name",
    "description": "extension description.",
    "permissions": ["activeTab", "storage", "tabs", "scripting"],
    "host_permissions": [
      "*://www.examplewebsite.com/*"
    ],
    "content_scripts": [
      {
        "matches": ["*://www.examplewebsite.com/*"],
        "js": ["content.js"],
      }
    ],
    "background": {
      "service_worker": "background.js"
    },
}

I tried to look this up but could not find a straight answer. Testing it by "load unpacked" in your own browser doesn't work bc it just auto-accepts all the permissions.

0

There are 0 best solutions below