Skip to content

Option to automatically pin installed extension #2874

Open

Description

@Californ1a

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.

Activity

  1. Rob--W commented on Sep 28, 2023

    @Rob--W
    Member

    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

  2. Californ1a commented on Sep 28, 2023

    @Californ1a
    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.

  3. GabenGar commented on Feb 1, 2024

    @GabenGar

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions