Questions tagged [jpm]

jpm was a Firefox Add-on SDK command-line tool that could be used to initialize, run, test, and package add-ons.

From the official website:

The Firefox Add-on SDK command-line tool that you use to initialize, run, test, and package add-ons.

jpm is based on Node.js. You can use jpm for Firefox 38 to 57. The jpm tool was the replacement for cfx. It enables you to test, run, and package add-ons.

jpm is deprecated in Firefox 53 and EOL'd in Firefox, as it was part of the Add-on SDK (which has been replaced by WebExtensions).

79 questions
3
votes
1 answer

How to view jpm console warnings

jpm test reports to console: .console.warn: reusetab: 10 warnings or errors were logged to the platform's nsIConsoleService, which could be of no consequence; however, they could also be indicative of aberrant behavior. How do I view these…
Basilevs
  • 22,440
  • 15
  • 57
  • 102
2
votes
1 answer

How to install JPM on Windows?

I am using Windows and I followed this tutorial and this one which should teach me how to install JPM. I installed node.exe to the folder C:\nodejs as instructed, but I cannot find any npm or jpm program which I am supposed to launch like this: npm…
John Boe
  • 3,501
  • 10
  • 37
  • 71
2
votes
1 answer

List all drives Addon SDK (Nodejs/jpm) without require Chrome

Is this the only SO question about listing drives ?? I'm on Windows, I'm a newbee in addon developement, I (currently) use Firefox Addon SDK with Node.js/jpm, but not Web Extensions (yet), nor the XPCOM/XUL thing. Seems like some are mixing the…
Karl Stephen
  • 1,120
  • 8
  • 22
2
votes
2 answers

Bootstrapped extension with new jpm Firefox

I'm realizing a Firefox extension using one of the last (or the last) version of jpm (1.0.5) but the extension does not call the startup() or shutdown() methods. I know that should be mandatory to declare the extension…
hasmet
  • 758
  • 3
  • 13
  • 32
2
votes
1 answer

Firefox addon - icon not showing

I'm trying to write an Addon for Firefox. For this I'm using the Mozilla "Addon-SDK". When i use the "jpm run" function all works well. But as soon as i package it to an xpi and install it, the icon wont show up in the toolbar. This seems to be a…
2
votes
0 answers

jpm-mobile, Doesn't work xpi in Firefox nightly on android

I try to create simple xpi example. In my project folder I run "jpm init" command and changed code in index.js on this: var menuId; function loadIntoWindow(window) { if (!window) return; menuId = window.NativeWindow.menu.add("View Source",…
umni4ek
  • 365
  • 1
  • 2
  • 16
2
votes
2 answers

Detect double click in firefox extension button

I need to detect a double click on the button of my extension and open a different website and I need that website to be opened in the current tab. index.js: var buttons = require('sdk/ui/button/action'); var tabs = require("sdk/tabs"); var button…
user3109249
2
votes
2 answers

Testing Firefox Add-on/Extension Internationalization

I have created a Firefox Add-on using jpm and I have added a number of localization files such as: locale/da.properties locale/en-GB.properties locale/en-US.properties locale/fi.properties And so on... In my HTML files I use attributes to set…
LondonAppDev
  • 8,501
  • 8
  • 60
  • 87
2
votes
0 answers

firefox add-on use `Components` global lead to tests fails

I using JPM build the xpi package for firefox addon, but JPM insert a file bootstrap.js into xpi package automatically. It will lead to test fails when I submit addon to the addon developer hub. Extension tests info as following: Access to the…
2
votes
1 answer

Mozilla Add-On Execute code on first run

I am currently building an add on and I wanted to execute specific code on the first run. More specifically I want to click on my add on button, browse through my files and select an executable file. This browsing process should only be done on the…
Wajih
  • 229
  • 1
  • 2
  • 12
2
votes
0 answers

jpm giving Error on adding the required Sdk library

As per MDN we can use the browser's local storage using the simple-storage module. But when I am trying to include any package in the .js file i get the error saying JPM undefined Message: ReferenceError: require is not defined The sample code…
OshoParth
  • 1,492
  • 2
  • 20
  • 44
2
votes
1 answer

npm modules in Firefox-Addon content scripts

With jpm, one now (from Firefox 38 on) has the possibility to use npm modules in Firefox Add-ons, cf. the documentation on MDN. This appears to be restricted to the main entry file (index.js by default), especially since require() isn't defined in…
Nico Schlömer
  • 53,797
  • 27
  • 201
  • 249
2
votes
1 answer

How to generate update.rdf with jpm

Rather than cfx's --updateurl command, with jpm, we can simply place the updateURL in package.json. This URL points to a file called update.rdf, which tells self-hosted addons where to look for updates. With cfx, that update.rdf file could be…
willlma
  • 7,353
  • 2
  • 30
  • 45
2
votes
1 answer

Trouble Packaging Firefox Extension

I have followed a couple different links that show how to package Firefox extensions. In cfx, my extension runs exactly how I want it. I made my install.rdf and zipped my files, changing the file type to xpi. When I install it in live Firefox, it…
Jase Pellerin
  • 397
  • 1
  • 2
  • 13
1
vote
0 answers

console.log doesn't work with jpm

I'm trying to log 1 to the console with jpm. The thing is that the google.com tab opens, but the 1 isn't outputed. Any ideas? var buttons = require('sdk/ui/button/action'); var tabs = require("sdk/tabs"); var button = buttons.ActionButton({ id:…
Matt
  • 37
  • 4