You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Option to automatically pin installed extension #2874
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.
Reacted by Malte, Ezra Ashenafi, Imamuzzaki Abu Salam, Almenon, Jonathan GUILLOT, karlicoss, Kincaid O'Neil, 荣顶 and Rory McMeekin
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.
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.
Activity
Rob--W commentedon 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 commentedon Sep 28, 2023
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 commentedon 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 yourmanifest.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 intoweb-ext run.