-
Notifications
You must be signed in to change notification settings - Fork 72
Description
Proposal: Incognito parameter in userScripts API
Background
There are occasions that userscript developers might want to limit their userscript to non-incognito tabs.
More importantly, users would benefit greatly from the ability to limit a userscript to non-incognito tabs, which improves the overall security of a userscript.
Firefox in MV 2 supported incognito control via cookieStoreId
in contentScripts.register() & userScripts.register() APIs.
Replacement APIs in MV3 i.e. scripting.registerContentScripts() & chrome.userScripts do not support the parameter (yet).
FireMonkey has been supporting this option since 2021.
Please note the following post for the use-case scenarios.
(User Metadata is the feature of FM to set/unset/override parameters set in a userscript)
See Also: [FireMonkey] should honor current container cookies
The feature has been requested of other userscript manager as well.
See Also: [Feature] Ability to disable scripts in and out of Private/Incognito mode
While Firefox has been supporting incognito via cookieStoreId
along with container support, for the sake of consistency between browsers, it might be simpler to add an extra incognito
parameter to the aforementioned APIs.
Keyword
Use incognito
in line with tabs.Tab
Proposal
Add optional boolean incognito
which defaults to true
incognito?: boolean,
// if `false`, don't inject into incognito tabs
// defaults to true