firefox-addon

Broken Firefox add-on update

We are providing updates to our Firefox add-on on our own http site. Due to an error in the manual signing process with McCoy, a version of the add-on was published with the wrong public key in its install.rdf. We don't have the matching private key to sign the update.rdf. The Firefox update manager is now silently ignoring our updates. ...

Sending Ajax request only once

I'm using the following code to call a function when the main browser's url changes. var mainWindow = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor) .getInterface(Components.interfaces.nsIWebNavigation) .QueryInterface(Components.interfaces.nsIDocShellTreeItem) ...

jax-ws on firefox extension

is it possible to use jax-ws web service in a firefox extension? ...

Firefox Add-ons, How to execute javascript function onLoad?

I'm new to Firefox Add-ons. I want to create a simple Firefox add-ons that append HTML element to a page automatically on document Load. Honestly, I want to add additional BBCODE/smiley toolbar to the any existing textarea. I got an example of xul (xml) file: <popup id="contentAreaContextMenu"> <!-- some code here --> </popup> ...

Which is faster, XPath or Regexp?

I am making an add-on for firefox and it loads a html page using ajax (add-on has it's XUL panel). Now at this point, i did not search for a ways of creating a document object and placing the ajax request contents into it and then using xPath to find what i need. Instead i am loading the contents and parsing it as text with regular expr...

How to create XPCNativeWrapper for HTMLDocument

Hi, I am having troubles with making my Firefox extension use xPath on a page loaded via AJAX inside my extension window. Here https://developer.mozilla.org/en/DOM/document.evaluate it says that evaluate can be used with HTML or XML documents to evaluate xPath expression. So, i created a HTMLDocument object, assigned the AJAX response ...

Is there a way to pass a variable to keypressed function?

I am trying to send the document and the control that the key was pressed in to the keypressed function. Here is my code: //Namespace MyExt.BrowserOverlay = { init: function() { var appcontent = document.getElementById("appcontent"); // browser if(appcontent) appcontent.addEventListener("DOMContentLoad...

Prevent Venkman (aka JavaScript Debugger) from printing to the console via window.dump()

The Venkman addon (officially called JavaScript Debugger) likes to print lots and lots of information using window.dump (or at least I assume that's what it's using since I don't know any other way to print to console). I would like it if the console contained only the output from my code, and not all the output from Venkman. I don't min...

Adding a scrollbar to a firefox extension's sidebar

I'm trying to add a scrollbar to a firefox extension so that it displays when the window is too small. I'm having issues with having the scrollbar span the entire range from top to bottom of the sidebar and only having it displayed when the window is too small. One extension that has the functionality I would like is the sage extension...

open new window and write to it in developing firefox extension

Hi , I am developing Firefox extension that will extract bibliographic information from specific website , and when the user press a button on firefox"the extension" a new window should appear with the bibliography data. my problem is I opened a new window with JS and write to it with the normal JS code : NewWin=window.open("","NewWin...

Including XPCOM inFirefox extension

I have a very limited experience with Firefox extensions development (read XUL School, written a couple of very simple extensions). I now need some functionality that is not available through Firefox XPCOM objects, namely running an external process and reading its stdout. It seems that this can be done using Protozilla. So my problems ...

Running Flash files (.swf & .html) in a Firefox sidebar

I'm developing a Firefox extension that runs a local Flash object (SWF and HTML files). I'm new to extension development so I followed a few web tutorials to run a simple Hello World application in a new window in Firefox. The test extension was simply a popup window that opened when you selected it in Tools menu. All in all, I know tha...

How can we measure size of a web page in firefox/IE?

I have to find the size of a web page (in pixel). To be precise, I click on a link, it opens a new web page. Now I want to know the size of newly opened web page. I tried using Measureit add-on. I also tried to use IE Developer Toolbar. How we can do this in firefox/IE? ...

Anyway to read a .plist from a firefox add-on?

Is there a pre-existing XPCOM guy that will let me interrogate a .plist file from Javascript, or do I need to use nsIFile and parse the XML myself? (For background, there is a version number in a directory structure I don't control that I need to read from a .plist in order to be future-proof.) ...

Is there a way to port a chrome extension to other browsers?

Is there a way to port a chrome extension to other browsers, without having to entirely re-write the code? My chrome extension uses the browser_action command to open "popup.html" in the extension window... Update: I found this and found it only somewhat helpful for porting... ...

Cannot access object's methods from within event handler using `this`

Below is my code for FF Extension monitoring browsing behaviour. I can't access trim method from processClick method handling click event. Console shows this.trim is not a function. I know that it maybe something with this scope. I will be really grateful for any help. function bbm(doc) { this.doc = doc; this.registerListene...

gBrowser.addEventListener: "load" event fired three times

Hi, I have installed the "hello world" dev example for Firefox extensions as described here: http://blog.mozilla.com/addons/2009/01/28/how-to-develop-a-firefox-extension/ I have modified the anonymous function that gets passed to gBrowser.addEventListener: gBrowser.addEventListener("load", function (event) { var t = event.target;...

.onload called multiple times from Firefox extension

I'm developing a Firefox extension and have the following code: function initialize() { // For accessing browser window from sidebar code. var mainWindow = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor) .getInterface(Components.interfaces.nsIWebNavigation) .QueryInterface(Compon...

Why is loadURIWithFlags not using the charset that I'm passing to it?

I have an HTML document stored in a file, with a UTF-8 encoding, and I want my extension to display this file in the browser, so I call loadURIWithFlags('file://' + file.path, flags, null, 'UTF-8', null); but it loads it as ISO-8859-1 instead of UTF-8. (I can tell because ISO-8859-1 is selected on the View>Character Encoding menu, and be...

Browser HTML filters?

When writing filters for the Firefox Add-On 'Adblock Plus' you can write rules to completely remove certain HTML elements from the page, but filtering criteria is in fact limited to a handful of things, like class and id names and attribute values. What I was hoping for is say a Firefox Add-On which would pass the HTML for a page to som...