The declarativeContent API from Chromium does currently not offer any way to hide page actions, or to exclude actions on certain URLs.
In contrast, the
page_action.hide_matches manifest key from bug 1419842 does offer the ability to hide the page action on certain URLs.
I want to ignore
page_action.show_matches when the declarativeContent API is used. For this reason,
declarativeContent should at least cover the existing functionality (i.e. offer the ability to show a page action on certain URLs, excluding some others).
Introducing a new rule would solve this problem:
declarativeContent.IgnoreRules (NEW) +
hide_matches pattern as condition. High prio.
show_matches pattern as condition. Low prio.
Since rules are processed in the order of priority, the first condition would allow extensions to ignore the ShowPageAction rule on certain pages.
In this simple example,
IgnoreRules does not need any arguments. I do however intend to add a way to be more specific about the rules that an extension can ignore, e.g. a field to limit to certain priorities, and/or a field to limit to certain rule IDs.
Relevant external resources: