Skip to content

manifest key to enable automatic injection of content scripts after installation/update #617

@tophf

Description

@tophf

Benefits/goals:

  • Fixes inconsistency (Chrome doesn't do it, Firefox and Safari do).
  • Makes the extension immediately usable.
  • Simplifies code: no need for a nontrivial workaround that requires duplicating matches in host_permissions and doesn't support exclude_matches yet (#123).
  • Doesn't require reloading the tabs, which may lose their state (games, modern infinite-scroll pages).
  • Solves a common pain point for new developers so they don't waste a lot of time in debugger/stackoverflow/etc.

Possible solutions:

  1. "run_at": ["document_start", "extension_installed", "extension_enabled"] i.e. an alternative array syntax for run_at
  2. "run_at_extension": ["installed", "enabled"] i.e. an additional key
  3. "run_at_installed": true and "run_at_enabled": true
  4. "run_at_installed_or_enabled": true

Notes:

  • In 1 and 2 the browser should disallow invalid/duplicate values.
  • The solution should also apply to #600 e.g. "extension_invoked" in 1, "invoked" in 2, "run_at_invoked" in 3 and 4.
  • Eventually this should be the default mode, but for now the current default behavior should be explicitly documented:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions