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
6
votes
1 answer

XPCOM Socket is closing. How to keep it alive?

I'm currently developing a firefox add-on that is a client who connects using TCP sockets to a server. In my little test everything works ok, the client(ff add-on) connects to the server(designed in java) and sends a message, but after that firefox…
Doua Beri
  • 10,612
  • 18
  • 89
  • 138
6
votes
3 answers

Modify contents of Firefox download dialog from add-on kit

I'd like to be able to add an option to the download dialog that pops-up in Firefox when starting a file download. Is it possible to do so using the new add-on SDK or do I have to do it the old way? edit: Obviously, if the new option is selected, I…
CAFxX
  • 28,060
  • 6
  • 41
  • 66
6
votes
2 answers

Firefox: How can I add/modify toolbars using the Add-on SDK (Jetpack)

So I've looked over the documentation for the Add-on SDK several times now and no where can I see how to create toolbars or modify existing ones. They have a tutorial on creating add-on bar icons but thats not what I want. Does the Add-on SDK…
Telanor
  • 4,419
  • 6
  • 29
  • 36
6
votes
2 answers

Firefox Extension API - permissions.request may only be called from a user input handler?

I'm using the Firefox permissions API documented HERE I'm having a problem with the request method, wherein all of my permissions requests result in: Error: permissions.request may only be called from a user input handler You can produce this in…
6
votes
2 answers

Firefox Jetpack Development Debugging

So, I'm working with some JS in Firefox and also working with the jetpack sdk. I am working in a JS editor, and then I run the sdk through the command line. However, when there is a bug there is no way to debug this because the JS is being…
Sara Chipps
  • 9,322
  • 11
  • 58
  • 103
6
votes
1 answer

How to change firefox preferences (about:config) using the new WebExtensions api?

To change the settings (about:config) with the old API you would simply do: require('sdk/preferences/service').set('media.webrtc.debug.multi_log', true); I can't find anything on the subject for the new WebExtensions add-ons of Firefox. Is it not…
6
votes
0 answers

firefox addon change response code

I have an extension that is checking response in http-on-examine-response listener. In the listener it is possible change the headers via httpChannel, and via nsITraceableChannel we can change response content. But how to change response code (for…
msangel
  • 9,895
  • 3
  • 50
  • 69
6
votes
3 answers

Creating a new Firefox add-on: XUL or Jetpack?

If you were going to start developing a new Firefox add-on today, would you still use XUL/JS or would you start using Jetpack, the new add-on framework? The XUL way of creating add-ons will continue to exist on Firefox 4 but Jetpack is clearly…
flpmor
  • 861
  • 5
  • 10
6
votes
1 answer

run jpm with profile: how to see console messages?

When I run my extension with jpm -p myuser I don't see any console.log messages any more: that's almsot impossible to debug. Same trouble described here : https://discourse.mozilla-community.org/t/jpm-run-with-profile-and-logging/3114/3 Any idea…
yarek
  • 11,278
  • 30
  • 120
  • 219
6
votes
5 answers

Firefox disable the add on I'm developing

I'm developing an Firefox add-on with it's latest jpm SDK. After I done the major code, I use jpm run command to run the extension. but the addon is disabled. it says "ADDON NAME could not be verified for use in FIREFOX VERSION and has been…
Hank X
  • 1,988
  • 2
  • 14
  • 32
6
votes
0 answers

Console logging certain objects don't work when developing a Firefox extension using React

Console logging certain objects, like this.refs or the window object results in a TypeError: cyclic object value error in the terminal. My code is pretty basic: I'm trying to change the html on a web page (placing a react component in…
timetofly
  • 2,957
  • 6
  • 36
  • 76
6
votes
3 answers

Firefox add-on: inject content script to iframe with src as "about:blank"

We are developing an add-in, and would like to have the content script being injected into the top page and all frames. However we found that the content scripts cannot be injected into iframe with src as "about:blank" or "javascript:...". Any…
Easton L.
  • 2,904
  • 1
  • 14
  • 15
6
votes
2 answers

Firefox add-on sdk uninstall hook

I keep some user data in simple-storage. When the user uninstalls the add-on I want to remove this user data. Is there some event or something similar?
Georgi Naumov
  • 4,160
  • 4
  • 40
  • 62
6
votes
1 answer

FireFox Addon: How to override native js function

I am trying to run a script on page load using pageMod: but I could not see its effect var data = require("sdk/self").data; var attachTo = require("sdk/content/mod").attachTo; var pageMod = require("sdk/page-mod"); pageMod.PageMod({ include:…
kashif
  • 87
  • 1
  • 4
6
votes
3 answers

Firefox extension custom fonts

I am using the Firefox Add-on SDK to create an extension and am performing a PageMod. This code is in main.js. ... exports.main = function() { var pageMod = require("sdk/page-mod"); pageMod.PageMod({ include: "*", contentScriptWhen:…
mildog8
  • 2,030
  • 2
  • 22
  • 36