I’m developing a Chrome extension using Manifest V3 and trying to achieve page-action–like behavior (enable the extension only on specific pages).
I’m using chrome.declarativeContent with PageStateMatcher and ShowAction() to enable the action on matching URLs (for example, Wikipedia article pages).
However, I noticed that:
chrome.declarativeContent.HideAction() does not exist in MV3
ShowAction() only enables the action, but there is no declarative way to disable or hide it on non-matching pages
Once the action is enabled (or pinned), it stays enabled on all pages
declarativeContent can only enable actions but not disable them?I want to make sure I’m following the official and future-proof pattern.


Thanks in advance!