Questions tagged [firefox-addon-sdk]

The Add-on SDK is a set of tools and APIs that allow you to create Firefox add-ons using standard web technologies (HTML, CSS, and JavaScript). The SDK includes APIs, a test framework and documentation as well as a command-line tool for creating, running and testing extensions.

The Add-on SDK was an API for creating simple Firefox extensions using standard web technologies (HTML, CSS, and JavaScript). The SDK included APIs, a test framework and documentation as well as a command-line tool for creating, running and testing extensions. Earlier versions of the Add-on SDK were released under the name Jetpack.

The Add-on SDK was deprecated in Firefox 53 and EOL'd in Firefox 57 in favor of WebExtensions. The Add-on SDK is now considered to be a legacy technology, as extensions built with it will not work after Firefox 57.

For general information about Firefox add-ons incl. SDK add-ons, see the tag.


Documentation :

2083 questions
8
votes
1 answer

Firefox Addons SDK - How to access simple storage from content script?

I am using the new FireFox Addons SDK to develop an extension. I have a widget, with a panel attached. The panel is used for controlling preferences, so I need to access simple-storage api from the panel's content script. I'm aware that you cannot…
Cameron Martin
  • 5,952
  • 2
  • 40
  • 53
8
votes
2 answers

Inject a CSS file into a webpage via firefox extension

I am writing a Firefox extension and I am using their Add-on SDK; but I can't figure out how to inject a local CSS file from the data folder into the webpage. It would be great if there were a way to do it via page_mod package.
italiano40
  • 496
  • 9
  • 18
8
votes
2 answers

Panel positioning with the Firefox Add-on SDK

I am trying to make some headway positioning my panel in an Add-on make with the new SDK. I see that the documentation shows only one way to control the position of a panel, and that is by passing an anchor when you show() it: show(anchor) Displays…
doctororange
  • 11,670
  • 12
  • 42
  • 58
8
votes
4 answers

How to share code between content script and addon?

I'm writing an extension for Firefox 4+. I have some code in a file named utils.js which I'd like to call from both the addon's main.js and from the page-mod's content script. Is it possible to refer from both to the same utils.js? If so,…
8
votes
1 answer

How to use Flowplayer functions in a content script?

I am trying to write a Firefox add-on for personal use and to learn a bit more about both JavaScript and the Firefox Add-on SDK. The add-on should open a vivo.sx URL and then automatically start the player, but I have 2 issues. I hope you guys can…
8
votes
1 answer

How to communicate a simple html page containing a button with an add-on script using port.emit

I'm trying to implement my very first Firefox add-on so I'm a completely beginner. I've been reading about [page-mod][1] documentation on Firefox webpage. I still don't understand yet how to do it. Basically in a basic html page I have a button,…
Cheknov
  • 1,892
  • 6
  • 28
  • 55
8
votes
1 answer

Installing unsigned XPIs in Firefox for Android version 42 or newer

I'm trying to retake an old project, an extension for Firefox for Android, I was developing. I have 2 phones, a personal one and the one of my work. In mine I have an old version of Firefox (40). It works exactly the same as it used to be. But, in…
gal007
  • 6,911
  • 8
  • 47
  • 70
8
votes
1 answer

TypeError document.querySelector(...) is null

I'm making a FF extension and I hit a snag. Here's what I have: var canLink = document.querySelector('link[rel="service"]').href; This finds a link with rel="service" and it works great. However, if the page does not have a link with rel=service,…
Jase Pellerin
  • 397
  • 1
  • 2
  • 13
8
votes
1 answer

Firefox Extension Addon SDK combine multiple 'Action Buttons'

I want to combine two 'Action Buttons' into one, the same way Firefox currently does with their Bookmarks addon, notice it is treated as one button in the 'Customize...' options. Here is a screenshot of of the entire button on the navBar. Here is a…
8
votes
4 answers

Security Error when trying to load content from resource in a Firefox Addon (SDK)

I am creating a firefox addon using the SDK. My goal is simple, to intercept a specific iframe and load my own HTML page (packaged as a resource with my addon) instead of the content that was requested originally. So far I have the following…
im_nullable
  • 555
  • 1
  • 6
  • 17
8
votes
1 answer

Play audio from firefox extension's data directory

I'm making a Firefox extension and I'm failing to play a sound that's located in add-on's data directory. The first thing I've tried was playing it in a content script this way: var soundFile = self.options.soundFile; (new…
Aleksei Zyrianov
  • 2,294
  • 1
  • 24
  • 32
8
votes
4 answers

Is there an equivalent for Chrome's 'setBadgeText' in Firefox Add-on SDK?

Chrome's method chrome.browserAction.setBadgeText overlays text on top of the extensions icon. This is handy if you want to display total unread mails for example. Is there an equivalent method when developing a Firefox Addon SDK extension, or what…
7
votes
1 answer

Changing Firefox addon install icon

I'm working on developing a Firefox add-on using the Add-on SDK. I changed my package.json file to include entries for a 32x32 icon and a 64x64 icon. { ... "icon": "icons/icon-32.png", "icon64": "icons/icon-64.png", …
fixedpoint
  • 1,575
  • 1
  • 17
  • 24
7
votes
1 answer

Using XPCOM components from Mozilla Add-on SDK

I have worked on Mozilla Add-on Development in the past (beginner level). But on encountering XPCOM, I got really scared and left it in the middle. Recently only I encountered Add-on SDK and found it to be really cool, and it was really fascinating…
Shatu
  • 1,819
  • 3
  • 15
  • 27
7
votes
3 answers

How to filter out iframes in an Add-on SDK extension?

The main problem is that my extension is loading into every iframes on a target webpage. It puts buttons that appear inside the iframes as well. I want them to disappear. The window and document objects are shown as the parent's window and document…
Gera János
  • 95
  • 1
  • 7