Implement declarativeContent.IgnoreRules action
Categories
(WebExtensions :: General, enhancement, P5)
Tracking
(Not tracked)
People
(Reporter: robwu, Assigned: robwu)
References
(Blocks 1 open bug)
Details
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.hide_matches
and 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.declarativeContent.ShowPageAction
+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:
- A developer story that shows the problem with the inability to hide page actions when declarativeContent is used: https://stackoverflow.com/questions/30547375/hide-pageaction-with-declarativecontent-in-google-chrome-extension-api
- Feature request in Chromium's issue tracker: https://bugs.chromium.org/p/chromium/issues/detail?id=494509
Updated•6 years ago
|
Comment 1•6 years ago
|
||
Sounds like a good addition to the API. Bump to P2 if it makes sense to add this feature while you are already working with the declarativeContent API (and the scope of this addition doesn't push out other commitments for 68/69).
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•2 years ago
|
Description
•