Questions tagged [firefox-addon-restartless]

A restartless or bootstrapped Firefox add-on is an add-on that does not require restarting the browser in order to install, enable, disable or remove it. Restartless add-ons, however, have some limitations, such as no support for XUL overlays.

A restartless or bootstrapped Firefox add-on is an add-on that does not require restarting the browser in order to install, enable, disable or remove it. Restartless add-ons, however, have some limitations, such as no support for XUL overlays.

Some add-on types, such as dictionaries, are always restartless.

81 questions
0
votes
2 answers

What are the scopes and/or persistence of JavaScript Code Modules?

Experimenting with a bootstrapped extension, I'm trying to understand the scopes and/or persistence of jsm modules by setting a property, called baseUri, on a module object from bootstrap.js and reading it again from javascript in my options.xul…
0
votes
1 answer

Can the behavior of the Firefox FIND be changed or augmented through an add-on?

Can the behavior of the Firefox FIND (Ctrl + f) be changed or augmented through an add-on? If it can not be changed, how can an add-on insert elements into the Find-bar so that it is activated at the same time as FIND with (Ctrl + f)?
erosman
  • 7,094
  • 7
  • 27
  • 46
0
votes
0 answers

Can the new tab be opened in the background in HTML Form target="_blank"?

Adding target="_blank" to form will post & open the result in a new tab (or window).
// and from the addon…
erosman
  • 7,094
  • 7
  • 27
  • 46
0
votes
2 answers

XMLHttpRequest POST formData to a new tab

Since, loadOneTab() is not available for formData, How can formData be posted to a new tab? How can the above new tab foreground/background status be set? Just a smaple example from Using FormData Objects: var formData = new…
erosman
  • 7,094
  • 7
  • 27
  • 46
0
votes
1 answer

How to pass formData to postData in loadOneTab?

I have a formData object and would like to pass it to loadOneTab() Example: var formData = Components.classes['@mozilla.org/files/formdata;1'] .createInstance(Components.interfaces.nsIDOMFormData); formData.append('Content-Type',…
erosman
  • 7,094
  • 7
  • 27
  • 46
0
votes
1 answer

How to know loaded window is Firefox Electrolysis Window

I want to code a functionality for Firefox Electrolysis window. But how can I know loaded window is Firefox Electrolysis window but not the normal Firefox window? var WindowListener = { setupBrowserUI: function(window) { // }, …
0
votes
2 answers

Use HTTP-on-modify-request to redirect URL

I am building an add-on for Firefox that redirect request to a new URL if the URL match some conditions. I've tried this, and it does not work. I register an observer on HTTP-on-modify-request to process the URL, if the URL match my condition, I…
0
votes
1 answer

Why in Firefox Addon the imported objects can not access the importers' imported modules?

For clarification, please consider the following simplified example: one.js Components.utils.import('resource://gre/modules/Services.jsm'); let obj = { init: function() { Components.utils.import('chrome://myaddon/modules/two.jsm', this); …
erosman
  • 7,094
  • 7
  • 27
  • 46
0
votes
1 answer

Firefox Addon Reading Local XPI, File and Directory Listing

Following a chat in #amo-editors, I was wondering if the following are possible from a Firefox Addon: Opening a local XPI for reading Listing all files in above XPI with their sizes Reading selected files
erosman
  • 7,094
  • 7
  • 27
  • 46
0
votes
2 answers

Utilizing Firefox's default/built-in Event Listeners

I have a context menuitem which is activated if an image is right-clicked, the exact same way that 'context-copyimage' is activated. Is it possible to tie/pair that menuitem to the 'context-copyimage' therefore eliminating the need to add extra…
erosman
  • 7,094
  • 7
  • 27
  • 46
0
votes
1 answer

Firefox Addon: What is the best way to insert a large chunk of HTML?

While createElement() and appendChild() is the preferred method, it can become tedious for large chunks of HTML. Here is an example:
erosman
  • 7,094
  • 7
  • 27
  • 46
0
votes
2 answers

Grouping Context Menu items together

In Firefox Bootstrapped Addons, Context Menu items have to be manually inserted/removed, enabled/disabled and hide/unhide. I was wondering if it was possible to group them together into one element (as children of that element) so that the group…
erosman
  • 7,094
  • 7
  • 27
  • 46
0
votes
2 answers

Can createElement be used when window object is not available?

In a Firefox bootstrapped addon at a stage that window object is not available yet, I would like to create an element to be kept as a template (not to be inserted at the time). I was wondering if that is possible? Can createElement() be created…
erosman
  • 7,094
  • 7
  • 27
  • 46
0
votes
1 answer

Does Components.utils.unload() also unload subsidiary imports?

Considering the following example: Components.utils.import('chrome://something/content/main.jsm'); // inside main.jsm Components.utils.import('chrome://something/content/sub.jsm'); Does unloading main.jsm also unload sub.jsm or should sub.jsm be…
erosman
  • 7,094
  • 7
  • 27
  • 46
0
votes
1 answer

Default Preferences in a Firefox Bootstrapped Addon

Firefox Bootstrapped Addons do not read the Default Preferences like Overlay Addons. I understand the need of manually setting default preferences when a Bootstrapped Addon is installed. After the initial installation, I guess the only benefit of…
erosman
  • 7,094
  • 7
  • 27
  • 46