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
250
votes
13 answers

How can I fix WebStorm warning "Unresolved function or method" for "require" (Firefox Add-on SDK)

I'm using WebStorm 7 for Firefox Add-on SDK development. WebStorm shows a warning: "Unresolved function or method" for require(). I want to get rid of the warning. var pageMod = require("sdk/page-mod"); NOTE:I already configured JavaScript-library…
skatsumata
  • 2,614
  • 2
  • 11
  • 7
105
votes
1 answer

How to identify who initiated the http request in Firefox?

I am developing a new Firefox addon that intercept all Firefox's network traffic (http(s) requests with http-on-modify-request) With my current code, I am able to separate requests coming from web-pages/tabs and all the other components (RSS feed…
66
votes
5 answers

What is the easiest way to develop Firefox extension?

I'm planning to develop a simple Firefox extension that will shorten URL of a currently active tab, display a popup with the shortened URL, and place it into the clipboard. In Google Chrome, this would be pretty easy (according to…
dorserg
  • 5,454
  • 3
  • 24
  • 29
44
votes
21 answers

ReferenceError: TextEncoder is not defined

I'm writing a simple addon in Firefox - 24, on Linux. I get the error: ReferenceError: TextEncoder is not defined when I do: var encoder = new TextEncoder(); the function I'm using is: function write_text(filename, text) { var encoder = new…
user621819
27
votes
4 answers

Getting the real HTML5 video width and height

I have a video element: var video = window.content.document.createElement("video"); video.width = width; video.height = height; video.style.backgroundColor = "black"; window.content.document.body.appendChild(video); And I'm retrieving it's source…
gal007
  • 6,911
  • 8
  • 47
  • 70
25
votes
3 answers

Get add-on id of extensions in Firefox

I want to open extensions in browser tab as a normal html page so that I can automate it using selenium WebDriver. In firefox this can be done using link like this - moz-extension://f1b30486-cd88-4319-bbb5-d5e387103414/popup.html. But the problem…
23
votes
1 answer

What are the advantages/disadvantages of using the Add-on SDK to develop my Firefox extension?

I am developing (yet another) password manager add-on for Firefox. My add-on needs to: Add two context menu items to each password field. Open a dialog box or floating panel when the menu item is selected. Access a specific method of a specific…
PleaseStand
  • 31,641
  • 6
  • 68
  • 95
20
votes
5 answers

Logging to console from Firefox extension?

I understand that I can log to the console when using a Firefox extension with the cfx run command. Is there a way to log to a console after the extension has been packaged with cfx xpi? Logging to Firebug is fine if possible. I have found two blog…
David Tuite
  • 22,258
  • 25
  • 106
  • 176
17
votes
3 answers

Firefox Addon SDK: Ways to display options to user?

I'm quite new to addon development with firefox. I picked the addon sdk for porting my chrome extension to firefox. What would you suggest to display a options page / options panel / options window to a user? Loading a options.html file from my…
patchrail
  • 2,007
  • 1
  • 23
  • 33
14
votes
1 answer

Find URL of current tab. Making a FireFox Browser add-on

I'm making a Firefox Browser Add-on and need to find the url of the current tab I've tried this post Opening a URL in current tab/window from a Firefox Extension but it tells me that 'window' is not defined. (I think because I am making an add-on…
WillJones
  • 907
  • 1
  • 9
  • 19
13
votes
5 answers

How to install my .xpi on firefox android

I work on a firefox addon using JPM. I want to install it on my android phone, i've run "jpm xpi" and copy xpi on my sdcard. When i browse to file://path/to/my/xpi in android firefox nothing happen. Same issue if i upload xpi on my server and browse…
Lezme
  • 266
  • 1
  • 3
  • 12
13
votes
1 answer

Why use var { VariableName } = require('') in javascript?

I have seen lot of examples in Firefox addon-sdk which uses the below style when declaring a variable. var { Hotkey } = require("sdk/hotkeys"); What difference it makes with var { Hotkey } than using var HotKey? Why the extra flower brackets are…
Navaneeth K N
  • 15,295
  • 38
  • 126
  • 184
12
votes
3 answers

Intercept and modify DOM before page is displayed to user

I'm trying to create a Firefox addon (using addon SDK) that will modify how the page is displayed, mostly as a training/learning exercise. For some tasks (like augmenting pages with new functionality) using pageMod is perfectly fine. Page loads and…
Gerino
  • 1,943
  • 1
  • 16
  • 21
12
votes
2 answers

JavaScript `of` Keyword (for...of loops)

I just spotted, in Firefox SDK JavaScript (on MDN), the use of a keyword I have never seen before: var tabs = require('sdk/tabs'); for (let tab of tabs) console.log(tab.title); Is the of keyword made up by Mozilla or is it standardized?
Nick Russler
  • 4,608
  • 6
  • 51
  • 88
12
votes
2 answers

document.activeElement not available on firefox addon's content script only for Gmail

I am developing a Firefox addon using the addon-sdk. This addon adds a menu item to the context menu and user can right click on any edit controls to activate this menu item. Once activated, it shows a small popup with suggestions when user types…
Navaneeth K N
  • 15,295
  • 38
  • 126
  • 184
1
2 3
99 100