Search code examples
javascriptfirefox-addonfirefox-addon-sdk

Link to local contents


Can someone please tell me how to make an image saved in Data Folder an icon in Mozilla Add-on Builder.

I tried:

data = require('self').data
contentUrl : data.url(filename)

What did I do wrong?

Update

It worked well when the image is of type .png but for the type .ico . I really have no clue what happens in the background.

Can someone help??


Solution

  • I assume omitting the ;'s at the end of lines was also for intrigue.

    I find that when the file is something other than a 16x16 .ico file, the add-on will be painfully slow and the mouse cursor will disappear. Maybe that's just a Linux thing, or something else peculiar to my setup.