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

The icon for the plugin does not show up in the address bar, but rather only as a plugin icon. #16

Open
derickr opened this issue Mar 14, 2025 · 8 comments · May be fixed by #19
Open
Assignees
Labels
enhancement New feature or request firefox Firefox affected

Comments

@derickr
Copy link
Contributor

derickr commented Mar 14, 2025

Describe the bug
The old helper would show up in the address bar, right next to the star icon (to bookmark). This new one only shows up when you click on the "Extension" (puzzle piece) icon. It is possible to pin it to the toolbar, but not in the same place as the original extension did.

To Reproduce
Steps to reproduce the behavior:

  1. Install the extension
  2. See where it shows up (in the Extensions Icon drop down)

Expected behavior
A way of getting it back in the address bar.
ain your problem.

Desktop (please complete the following information):

  • Linux Debian Unstable (irrelevant)
  • Firefox
  • 129.0.2
@FraserChapman
Copy link
Collaborator

Hi @derickr - As you say you should be able to pin it, but you should also be able to position it anywhere that a control is valid. e.g.

Image

If that isn't what you mean, could you grab a screenshot of the icon in the position you are talking about? It could be there is some manifest trick to this I am not aware of if you mean inside the actual address input.

@derickr
Copy link
Contributor Author

derickr commented Mar 14, 2025

It's not what I meant. I can indeed pin it, next to the address bar. The earlier one was in the address bar.

Image

@FraserChapman
Copy link
Collaborator

Ah ok, thanks for the clarification - will have to take a look how that is handled!

@derickr
Copy link
Contributor Author

derickr commented Mar 14, 2025 via email

@FraserChapman
Copy link
Collaborator

FraserChapman commented Mar 14, 2025

It needs testing but I think this can be resolved with something like changing...

"action": {
    "default_popup": "popup.html"
}

to

"page_action": {
    "default_icon": "img/disable16.png",
    "default_popup": "popup.html",
    "show_matches": [
            "http://*/*",
            "https://*/*"
        ]
}

in the manifest...I would need to look into it more, it could be mozilla specific, etc - but that seems to be it :)

See https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/page_action

Image

Image

@derickr
Copy link
Contributor Author

derickr commented Mar 14, 2025 via email

@FraserChapman
Copy link
Collaborator

FraserChapman commented Mar 15, 2025

I actually have a draft PR with the changes made, so you could just pull that run the build on it.

#19

To test, you would go to that branch and..

  1. Run the build script
  2. Go to about:debugging in FireFox
  3. Select "This Firefox"
  4. Choose "Load Temporary Add-on"
  5. Select the XPI file that was created in step 1

As an aside the old code with: "show_matches" : [ "*://*/*" ] is odd...In that the match pattern "*://*/*" wouldn't make sense for a page_action because it matches every protocol (about:, file:, chrome:, etc) . If it truly should be there for the browser as a whole in any context it should be a action with a default_area not a page_action

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/action

@FraserChapman FraserChapman self-assigned this Mar 15, 2025
@FraserChapman FraserChapman added enhancement New feature or request firefox Firefox affected labels Mar 15, 2025
@derickr
Copy link
Contributor Author

derickr commented Mar 25, 2025

I've tried this out, and it works — I see it in the address bar again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request firefox Firefox affected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants