Skip to content

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

@fregante

Description

@fregante

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"],
		}
	]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions