Skip to content
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

Use the container name while matching #558

Open
NicolaSmaniotto opened this issue Nov 1, 2023 · 1 comment
Open

Use the container name while matching #558

NicolaSmaniotto opened this issue Nov 1, 2023 · 1 comment

Comments

@NicolaSmaniotto
Copy link

For some websites I have multiple accounts, stored in different top level folders, something like:

a/example.com
b/example.com

Right now opening example.com the first result is the one in a, since they both match and the result are sorted alphabetically.

It would be useful to include the name of the current container in the search, so that opening example.com while inside container b would better match the second one.

@tuxor1337
Copy link
Collaborator

tuxor1337 commented Nov 3, 2023

This would probably be implemented via the contextualIdentities API (https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/contextualIdentities and https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Work_with_contextual_identities). Extract the cookieStoreId from the current tab, get a list of all contextuals identities using browser.contextualIdentities.query, and then look up the name of the contextual identity that has this cookieStoreId. Then, use the name as an additional indicator when searching for entries matching this site, maybe at the lowest level of match quality, after matching domains, subdomains, and paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants