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

v10 doesn't fully support complex conditions in MV2 Chrome #62

Open
fregante opened this issue May 16, 2023 · 0 comments
Open

v10 doesn't fully support complex conditions in MV2 Chrome #62

fregante opened this issue May 16, 2023 · 0 comments
Labels

Comments

@fregante
Copy link
Owner

There's a very rare situation that is no longer covered by webext-dynamic-content-scripts. This is a long list of conditions that have to appear at the same time for the bug to appear:

  • You're on Chrome
  • Your manifest_version is 2
  • Your manifest has multiple objects inside content_scripts
  • Your content_scripts mentions the same file twice (for example to be injected onto multiple domains, via manifest)
  • Your content_scripts have one of run_at, exclude_matches, all_frames
  • Your other content_scripts do not have the same exact property

If this is happening, you should stay on v9 of this module until you upgrade to Manifest v3.

Here's an example extension affected by this limitation:

{
	"manifest_version": 2,
	"content_scripts": [
		{
			"all_frames": true, // Present here, missing from the next one
			"matches": ["https://example.com/*"],
			"js": ["content.js"],
		},
		{
			"matches": ["https://www.example.org/*"],
			"js": ["content.js"],
		}
	]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant