Skip to content

Proposal: Exclude Matching #756

@erosman

Description

@erosman

Proposal: Exclude Matching

Background

While some APIs such as Content scripts or scripting support excludeMatches, there are others that don't have such option.

menus/contextMenus is a commonly used example where documentUrlPatterns is insufficient for this purpose.
Other examples include: webRequest.RequestFilter urls.

Another example would be disabling context menus on (chrome/moz)-extension://.

Proposal

Provide a method to exclude match in APIs the don't have them

Suggestions

A few possibilities:

  1. Consider negative matching in Match patterns
    As once suggested in Exclude in Match patterns, a negative match pattern that would simply translate to excludeMatches
    e.g. ["*://*.example.org/*", "!*://*.example.org/support/*"]
  2. Add additional matching property (e.g. similar to scripting) to APIs that don't have it

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions