Questions tagged [firefox-addon]

Commonly, you should use this tag IN ADDITION TO the tag for the specific type of add-on which you are asking about. At this point, the most common is firefox-addon-webextensions for WebExtensions based add-ons. A Firefox add-on is a way of adding to or modifying the Firefox web browser. Most commonly, questions in this tag are about Firefox extensions, which add new functionality to the browser, although "add-on" may also refer to themes or plugins.

A Firefox add-on is a way of adding to or modifying the Firefox web browser. Most commonly, questions in this tag are about Firefox extensions, which add new functionality to the browser, although "add-on" may also refer to themes or browser plug-ins.

7386 questions
17
votes
1 answer

event.keyCode alternative

I am developing a virtual keyboard extension for Firefox. One of the features of this extension is converting the keys the user presses to another layout. Example: I need to type text on Bashkir layout but my OS does not support it. So, I can use…
Ruslan Sayfullin
  • 193
  • 1
  • 1
  • 5
17
votes
6 answers

Modifying HTTP response headers in Firefox

Does anyone know if Firefox extensions are allowed to modify HTTP response headers? For example, can an extension remove the x-frame-options header to let the page load in an iframe? Thanks
Kar
  • 6,063
  • 7
  • 53
  • 82
16
votes
1 answer

ZIP confused. Plugin appears to be corrupted

I'm trying to write my first Firefox extension (I use Firefox 8.0.1) and I'm stuck: I have a working sample from https://addons.mozilla.org/en-US/developers/tools/package/ - downloaded file plugin.zip renamed to plugin.xpi seems to be OK. Then I…
adiog
  • 724
  • 1
  • 7
  • 10
16
votes
2 answers

ReferenceError: browser is not defined

I am running this piece of code and the firefox is giving error Uncaught ReferenceError: browser is not defined const manifest = browser.runtime.getManifest(); So far I've tried using this: var browser = browser || chrome; Still in this,…
Harshit Grover
  • 179
  • 1
  • 1
  • 4
16
votes
5 answers

Firefox Bookmarks SQLite structure

I am trying to write a Firefox 3 add-on which will enable me to easily re-tag bookmarks. For example I have some bookmarks tagged "development" and some tagged "Development" and I would like a way to easily update all the "delelopment" tags to…
Toby Mills
  • 996
  • 2
  • 9
  • 13
16
votes
1 answer

Install WebExtensions on Firefox from the command line

I found the question How to install Firefox addon from command line in scripts? that seems to work for Firefox extensions (i.e. ones with an install.rdf file) but what about WebExtensions (extension with a manifest.json file instead)?
fakedrake
  • 6,528
  • 8
  • 41
  • 64
16
votes
1 answer

How can a Firefox extension inject a local css file into a webpage?

I'm writing a Firefox extension that needs to inject a css file into webpages. The css file is bundled with the extension, so I can access it using a chrome url chrome://extensionid/content/skin/style.css I'm trying to inject css like this when the…
Evgeny Shadchnev
  • 7,320
  • 4
  • 27
  • 30
16
votes
2 answers

Objects in JavaScript defined and undefined at the same time (in a FireFox extension)

I am chasing down a bug in a FireFox extension. I've finally managed to see it for myself (I've only had reports before) and I can't understand how what I saw is possible. One error message from my extension in the Error Console is "gBrowser is not…
Alexey Romanov
  • 167,066
  • 35
  • 309
  • 487
16
votes
5 answers

Zero-configuration, automated, random testing tools for web-apps?

In short, I'm looking for a tool to perform an automated, zero-configuration, full-frontal assault on a web application. I'm thinking this would logically be a browser-extension that both crawls links on a given domain/path, AND randomly inputs data…
Dolph
  • 49,714
  • 13
  • 63
  • 88
16
votes
2 answers

"collapse all" all nodes in one click in firefox or chrome

Any way to "collapse all" all nodes in one click in firefox or chrome and then able to search a node's name and then quickly see its path/tree of parent nodes? First collapse not just top node, but all child nodes, and when I search for a node then…
15
votes
3 answers

How to enable YSlow in Firefox?

I have installed the latest versions of YSlow and Firebug into the latest version of Firefox on Windows 7 (and restarted Firefox), but when I click on YSlow nothing happens. Also, when I click on Firebug, it opens but has no YSlow tab. I have…
byronyasgur
  • 4,627
  • 13
  • 52
  • 96
15
votes
2 answers

Do firefox addons have something similar to "background page" concept?

I worked with Chrome extensions which have so called background page - an html page that is loaded in background once per browser window. You can store there some javascript variables, can access extension's own localstorage, can communicate back…
serg
  • 109,619
  • 77
  • 317
  • 330
15
votes
1 answer

Progressive web app(PWA) vs Electron vs Browser extension

The background for this question is that I've been working on what I'd call a tool in which a user can build modules that they can later run. It started out as a small web page and has grown over the last year into something that more closely…
Gary
  • 2,393
  • 12
  • 31
15
votes
4 answers

DOMContentLoaded event firing twice for a single page load

I authored a Firefox add-on several months ago that recently failed. The add-on basically looks for a particular URL and then modifies the DOM for the page. I traced the failure to the (accidental) installation of the "AVG Safe Search" add-on. I…
Jeremy Giron
  • 153
  • 1
  • 5
15
votes
2 answers

TypeError: [API] is undefined in content script or Why can't I do this in a content script?

I was trying to write a simple extension in Firefox wherein I modify the X-Frame-Allow header. I looked at the documentation briefly and I see that they support webRequest.onHeadersReceived.addListener(). However, I'm unable to get my code to run…