Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Manifest override by special target #952

Open
4 tasks done
monkeyWie opened this issue Apr 20, 2024 · 0 comments
Open
4 tasks done

[RFC] Manifest override by special target #952

monkeyWie opened this issue Apr 20, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@monkeyWie
Copy link

How do you envision this feature/change to look/work like?

Add manifest_specific configuration to support override the manifest for specific browser targets.

What is the purpose of this change/feature? Why?

For example: my extension needs to declare the webRequestBlocking permission in firefox, but not in chrome, because declaring it in chrome mv3 results in the error

(OPTIONAL) Example implementations

Configuration example:

{
  "manifest": {
    "host_permissions": [
      "http://*/*",
      "https://*/*"
    ],
    "permissions": [
      "downloads",
      "cookies"
    ]
  },
  "manifest_specific":{
    "firefox-mv2": {
      "permissions": [
        "downloads",
        "cookies",
        "webRequest",
        "webRequestBlocking"
      ]
    }
  }
}

Finally firefox-mv2 Firefox get the merged manifest.json:

{
    "host_permissions": [
      "http://*/*",
      "https://*/*"
    ],
    "permissions": [
      "downloads",
      "cookies",
      "webRequest",
      "webRequestBlocking"
    ]
  }

(OPTIONAL) Contribution

  • I would like to contribute to this RFC via a PR

Verify canary release

  • I verified that the issue exists in plasmo canary release

Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I checked the current issues for duplicate problems.
@monkeyWie monkeyWie added the enhancement New feature or request label Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant