Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firefox add-on : extension icon not showing

I'm working on developing a Firefox add-on using the Add-on SDK. My extension is working fine when using SDK, but when I create the .xpi file to add it manually to the browser, it does not show the extension icon.

I tried to change the icon path in the package.json file, but still it didn't shows the icon.

package.json file:

{...
  "icon"        : "Phone-icon48.png",
  "icon64"      : "Phone-icon64.png",
...}

Widget panel used to display icon:

WidgetPackage.Widget({
  label: "Phone Dial",
  id: "phone_dial",
  contentURL: data.url("images/Phone-icon19.png"),
  panel: panel_name
});

Can anyone help me resolve the issue?

Thank You.

like image 237
Dhiraj Rode Avatar asked Oct 15 '13 16:10

Dhiraj Rode


People also ask

Why my extension is not showing in Firefox?

Look in the Customize Box. If they are there, just click on them and shift to the toolbar. [Access Customize by right clicking on toolbar space or in the Three Horizontal Bar Menu.] Also look in this 3 bar Menu for Add-ons > Extensions to see if they are installed and see if they need to be enabled/activated.

How do I show extension icons in Firefox?

Right-click on your toolbar to open toolbar settings. Click on Customize Toolbar. Firefox will open a new page with a list of items that you can drag into the toolbar. Look for Add-ons and themes.


1 Answers

This may be a persistent bug. This thread reports a similar problem.

Ah - here is the solution. You put your icons in a folder called data in the root of your addon's directory and call them as if they were in root.

{...
    icon: { "16": "./icon-16.png", "32":"./icon-32.png", "64": "./icon-64.png" },
...}

When I did this then the icons show up in the toolbars. It isn't very clear, but if you piece things together, you might deduce that from here.

like image 187
bgmCoder Avatar answered Sep 20 '22 09:09

bgmCoder