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
10
votes
3 answers

Displaying multiline notifications

I just started playing around with Mozilla Jetpack, and I love it so far. I wrote a little code that displays an icon in the statusbar that, when clicked, brings up a notification: var myTitle = 'Hello World!'; var line1 = 'I am the very model of a…
eleven81
  • 6,301
  • 11
  • 37
  • 48
10
votes
3 answers

Using Add-on SDK to add toolbar buttons? Integrating XUL and Add-on SDK for Firefox Add-ons?

I have already coded most of a Firefox add-on using the Add-on SDK API. I am now discovering that Add-on SDK might not be powerful enough for my purposes. I need two things: A drop down button in the toolbar next to the location bar. To modify the…
Salami
  • 2,849
  • 4
  • 24
  • 33
10
votes
1 answer

Sharing data between files in a Firefox extension

I'm moving an extension from Chrome to Firefox and I'm using the Add-on SDK. To access functions declared in the background file from a panel or popup I can use chrome.extension.getBackgroundPage in Chrome. Is there some equivalent in Firefox…
10
votes
1 answer

ReferenceError: require is not defined

I'm currently working on a Mozilla Firefox addon. I have set up a panel and attached a content script to it. I need to communicate between the content scripts and main.js. I'm using the port api of the addon-sdk for this. However for some reason, I…
10
votes
3 answers

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…
Dhiraj Rode
  • 101
  • 1
  • 7
9
votes
2 answers

Firefox addon-sdk - listen for page navigation

I am trying to port a Chrome plugin to Firefox using the addon-sdk and I cannot find an equivalent method to listen to tab navigation events. What I need to do is keep data per page (detected from the DOM), and remove this as soon as the user…
Adam Heath
  • 4,703
  • 2
  • 35
  • 50
9
votes
2 answers

How to parse a XML string in a Firefox addon using Add-on SDK

I am trying to create a FF AddOn that brings some XML data from a website. But I can't find a way to parse my RESPONSE. First I used DOMParser but I get this error: ReferenceError: DOMParser is not defined. Someone suggested to use…
kriztean
  • 229
  • 3
  • 13
9
votes
3 answers

XMLHttpRequest in Firefox Extension

I am writing a FireFox-Extension and want to load Data from Server. But when I try to initialize the XMLHttpRequest with: var request = new XMLHttpRequest(); The error console says: ReferenceError: XMLHttpRequest is not defined Do I have to…
SteMa
  • 2,945
  • 2
  • 24
  • 30
9
votes
1 answer

Can Firefox addon panel determine when it is shown and hidden?

I am using the Tool API to add a panel to Firefox DevTools. I can define setup() and dispose() methods to handle initialization and teardown. However I can’t figure out how to determine whether the panel is currently visible, or when it changes…
Dan Abramov
  • 264,556
  • 84
  • 409
  • 511
9
votes
3 answers

Detect tab URL change inside a Firefox add-on

I have an extension, functional on Chrome, that monitors the active Tab for URL changes. Specifically, I need to detect when the URL changes, but there is no new page load or navigation. Some sites do this (e.g. when you click to view another video…
tiagosilva
  • 1,695
  • 17
  • 31
9
votes
1 answer

JPM not working

I've just tried using JPM for the first time, and I can't get anything to work. My index.js file looks like this: const actionButton = require('sdk/ui/button/action'); const TAG = "Addon Scratchpad / Index "; console.log(TAG+'in index.js'); var…
willlma
  • 7,353
  • 2
  • 30
  • 45
9
votes
2 answers

Using generators + promises to do "simulated synchronous" communication in/with a Firefox SDK add-on

TL;DR: Is there any way to rewrite this callback-based JavaScript code to use promises and generators instead? Background I have a Firefox extension written using the Firefox Add-on SDK. As usual for the SDK, the code is split into an add-on script…
9
votes
1 answer

Can a Firefox add-on listen on a UNIX socket?

I know how to listen on a dedicated port using nsISocketTransportService in Add-on sdk. But, is it possible to use UNIX socket in Add-on SDK to communicate with oher applications.
Mmh
  • 399
  • 1
  • 5
  • 16
9
votes
2 answers

PageMod attaching worker to same URL multiple times

CLEAN SOLUTION FOUND I found a very clean solution which really renders this whole question pointless, and I am certain it existed when I asked this question... I was much to ignorant too look for it. Using attachTo: 'top' in the PageMod constructor…
Rikonator
  • 1,830
  • 16
  • 27
9
votes
2 answers

IDE for Firefox Add-ons Development

I have been working on firefox add-ons for quite a long time and its been a real headache to use notpad++ for development. Is there any suitable IDE or plug-in for eclipse available.And just like we do **Run on Server" for dynamic web-projects,Is…
Priyank Doshi
  • 12,895
  • 18
  • 59
  • 82