-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: Incognito parameter in userScripts API #669
Comments
This feature sounds useful to not just the Although the proposal suggests a boolean
While Chrome only recognizes "incognito" and "non-incognito", in Firefox the "non-incognito" case can be separated in even more cases ("container tabs"). Firefox enables extensions to identify separate cases by |
Similar to #611. |
I discussed this with the Chrome team. We're supportive, although feel quite strongly that this should be an enum ( |
enum1. KeywordFrom the contextual point of view, using enum for
It might be more logical to use an alternative keyword e.g.
2. TypeThere can be 2 approaches:
3. CaseAs mentioned in #563, a consensus on case would be beneficial as modern APIs (as well as developers) tend to favour PermissionIn any case (enum or boolean), since incognito script injection often requires a specific permission, browsers should have a fallback (instead of a hard throw) in case permission had not been not granted. |
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 extraincognito
parameter to the aforementioned APIs.Keyword
Use
incognito
in line with tabs.TabProposal
Add optional boolean
incognito
which defaults totrue
The text was updated successfully, but these errors were encountered: