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

Option to automatically pin installed extension #2874

Open
Californ1a opened this issue Sep 11, 2023 · 3 comments
Open

Option to automatically pin installed extension #2874

Californ1a opened this issue Sep 11, 2023 · 3 comments

Comments

@Californ1a
Copy link

Is this a feature request or a bug?

Feature request

What is the current behavior?

It's a small nag, but when initially running web-ext run with either ff or chrome, the installed extension's action button gets hidden under the extensions menu so it takes a couple extra clicks to initially pin it if you're testing stuff on the extension's popup page.

What is the expected or desired behavior?

Automatically pin the action button for the installed extension so it can initially be interacted with a bit quicker.

A potential alternative workaround currently that I used is to set a custom profile, set the --keep-profile-changes once, pin the extension, then relaunch without --keep-profile-changes, but a direct option to pin the icon without a separate profile would be really nice if possible.

@Rob--W
Copy link
Member

Rob--W commented Sep 28, 2023

Both Firefox and Chrome support the ability to configure the extension toolbar location through system-wide enterprise policies.

Would this work for you?

From the Firefox engineering perspective, we are also supportive of adding a preference to customize the default placement of the button at install time. That would be a few lines of code at https://searchfox.org/mozilla-central/rev/6b91b922725838e2732aeb478b13e5b33e33ce1b/toolkit/components/extensions/ExtensionActions.sys.mjs#510-513 plus unit tests, a change similar to https://hg.mozilla.org/mozilla-central/rev/cb3c9ccc76d6

@Californ1a
Copy link
Author

As far as I know, the policy editor doesn't exist on Home editions of Windows, so that doesn't work for independent extension devs who aren't using Pro or Enterprise editions. Using the policies.json can get around that in ff, but the only alternative in chrome seems to be manual registry edits. Mainly though, the policies would get applied to all profiles of that browser rather than just the temp profile created by web-ext, and that config is outside the extension's project folder so it couldn't be checked into version control and doesn't allow for quickly/easily changing that config per-project.

@GabenGar
Copy link

GabenGar commented Feb 1, 2024

Looking at the code snippet above the default position of the popup button is defined by browser_action.default_area/action.default_area, firefox-only though. So the hack could be as simple as setting this field in your manifest.json, assuming the people who'd be bothered by this behaviour would disable it through policies. And as hard as creating separate dev/prod manifests with just 1 key difference or write a custom dev script which would create a copy of the manifest with this key added/changed and feed it into web-ext run.

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

No branches or pull requests

3 participants