Need Help: sdk/widget no more working after FF40

Hi All,

I have written a add-on earlier which uses Widget to display a Text on Add-On bar. The purpose of the Add-On was to search the text in the page and display a Text based on a criteria. But after upgrading to FF40, my add-on is not working. From documents I understand that Widget API is no more supported.

I tried using XUL method of creating add-on, but I dont understand how I can place a Label. I have been searching for long time but not able to find a solution/example to implement this using XUL as well.

Can someone please suggest some idea regarding this.

Widget was deprecated since 29

I don’t know XUL, but in SDK I have found a way to make ActionButton content scriptable. If by “display a text based on the criteria” you mean displaying that text in the button (or formerly, widget), you would do that by making it a <text> element within an SVG image, which you would assign as a data:image/svg+xml;base64,... type URI, to the icon property of the ActionButton. You can modify the SVG using DOM in a content script, which sends back the whole SVG file in base64. It’s a hack, but it works, and you get all the additional features of ActionButton without losing the variable (rather than constant) way of displaying widgets:

http://voodothosting.com/23/wordpress/?p=49

1 Like

Hi Lorraine Lee, ThankYou so much for your reply. The Link which you have provided is very much useful. I was able to get to changing the Icon with 2 Characters after some R&D on the code given in the article.
But due to the limitation of the Size of the Button, I can only display 2 Characters which are readable. But my Text is mostly around 15 Characters Long.

I am exploring more options with the help of link you gave. But if you have any other suggestions can you please share.

You can have a toolbar with a frame in your main.js. The frame is an html file with buttons. The main.js can send a message to the frame’s script to dynamically change the text of the buttons.