firefox-addon

Local file access and compiling a greasemonkey script to xpi

I want to provide some functionality through an extension. This requires (read and execute) access to some resource files (an mp3 file, a swf file and two js). I know user scripts cannot access local files and I need an extension (add-on) to do that. But can I start by writing a greasemonkey script and compiling it to a xpi? How should...

How do i alter the content of an iframe in the dom using firefox extension code?

I would like to alter the page shown in my browser using a firefox extension (add-on) i wrote. I am able to get the page's iframes as XPCNativeWrapper object using: iframes = window.content.document.getElementsByTagName('iframe') for (var i = 0; i < iframes.length; i++) { var elmInput = iframes[i]; Firebug.Console.log(elmInput); } ...

Firefox 4 - NPAPI plugin works with 3.6 now declared corrupt!

Can anyone help with packaging a simple NPAPI plugin so it is compatible with Firefox 4, we have a plugin that works fine in all previous versions of Firefox but when it is tried it on Firefox 4 Beta 5 (latest version as of the question) then the browser declares it is corrupt. If I run Firefox with the -console parameter on the command...

getElementById for XML Documents, Mozilla extensions

Is document.getElementById method supported on DOM parsed from XML strings using the DOMParser method in Mozilla ? I am making a mozilla extension that reads an xmlfile and uses DOM Parser to convert the xml into a DOM element, and tries getting elements by Id. The method getElementsByTagName works but not getElementById. It always retur...

FF Extension - Not Keeping Global Variable Values

Hey there, I'm working on a FF extension that in short, loads dynamic images into a sidebar. The ID's that I get are from a JSON response, and are stored in a global variable declared in the same .js file as I intend to use it. My problem is when I try to simulate paging through my results. I load the sidebar using my global variable an...

Signing data with PKCS #7 (opaque) for the web

Abstract: Is there a way, either via Firefox plugin or other means to emulate javascript crypto.signText using an opaque algorithm instead of detached (what it currently does?) to sign arbitrary data. This includes the dialog box and access to the Firefox cert store. Also, the signText documentation doesn't seem to have been updated sinc...

Override default jQuery selector context

I'm trying to use jQuery inside a Firefox extension, and actually want to use jQuery to manipulate the DOM of the current page, as opposed to the context of the XUL file. Thus, I load jQuery in my XUL file, and pass it to some of my scripts in a sandbox (using the Greasemonkey extension compiler http://arantius.com/misc/greasemonkey/scri...

firefox addon : adding icon to context menu

Hello, I'm trying to build a firefox addon & I want to add image/icon in the right click content menu , for example, firebug had an icon in the right click context menu, http://i.imgur.com/GjGAV.jpg I wanna do something similar, my addon also consists of menu items structure of my addon in context menu : [icon] [menu] ...

xul : creating a right click context menu item for only hyperlinks

Hello, I got a question to ask on building firefox plugin, basically my aim is to do following things, 1) In my plugin I want to show right click context menu item for only links[anchor tags] and hide the menu item for rest of the page 2) How to add dynamic list to my menu, i.e., adding the number of menu list items dynamically dependi...

Using Javascript to get what is currently typed into the url bar.

I'm writing a Firefox add-on and trying to get what is currently typed into the address bar, but every time I try, I get a null error. The code I'm using is var url = document.getElementById("urlbar").value; However, when I do that, the error I get is Error on line 1: document.getElementById("urlbar") is null`. I have a blank t...

Using Html DOM in firefox plug-in?

Can you use Html DOM in firefox plug in to... 1) write/Auto fill in a form? 2) Read values in label? Textboxes? And use them in your program? ...

XUL button doesn't appear

I'm one of the developers of TryAgain, a Firefox add-on, that displays a custom error page when a website fails to load. It essentially replaces Firefox's netError.xhtml with a customized version. However, I've run in to some fairly terminal compatibility problems between 3.0.*-3.6.* and Fx4b5. (An entry in netError.dtd has been renamed...

how to place icon for firefox addon installation / restart message screen ?

Hi all, I am writing a firefox addon. I have placed an icon for it which appears on installation screen. after installation when I am asked to restart firefox the icon does not appear on the screen which says “Restart Firefox to complete your changes” After installation again the icon starts appearing. How to make the icon appear on th...

Firefox addon to do something everytime a user hits Enter in the address bar

Hi, I'm trying to write an extension that monitors every time someone types hits enter when using the address bar. The steps would be something along the lines of User types in a bunch of text in the address bar and hits Enter My addon springs to life and recieves what the user typed in My addon then decides what to do with the string...

FF Extension - Vertically Aligning Images Inside of Div's (Using max-height/max-width)

I know this question has been done to death, so I'm really sorry that I have to ask it again but despite all of the information out there, I have found nothing that works for my specific circumstance. I currently have a sidebar in FF for an extension. Within this sidebar, I have(for simplicities sake) 3 things. <div id="resultsDiv"> ...

BIFF5 Excel - Pointing to XF and FONT records from LABEL record

Hi all, I'm using the FireFox API to write to a binary file from my JavaScript based FireFox extension. So far I am fully able to write the information to the file in BIFF5 format, and re-size the columns successfully. The problem I'm running into is no matter what I try, I can not seem to get the XF index (ixfe) in the LABEL record t...

BIFF5 - Excel - Workbook Stream Problems (corrupt file)

Hi all, I am successfully writing to an Excel file, using javascript from my FireFox extension. I can get the formatting, and contents that I want, however I have run into a roadblock. In order to add the formatting, I have to EOF the Workbook Globals Stream, and BOF the worksheet stream. When I do that Excel says the file is corrupt. ...

Firefox-Addon: How do i overwrite a UI function?

Actually i would like to modify the replaceWord function of the spellchecker. I tried (in my own firefox extension) onInit: original_replaceWord = InlineSpellCheckerUI.replaceWord; InlineSpellCheckerUI.replaceWord = function() { // things i would like to do (i.e. set the Cursor to another spot in the editor) // call of the o...

Firefox extension: How can I set the cursor position?

I have a page with possibly several content-editable iframes (editors). Now I would like to use my custom Firefox extension to do the following: Setting the cursor to the end (or last HTML element) of the editor the cursor actually is in. I found many solutions to get the cursor's position, but I need one to set it. Any suggestions? ...

Memory leaks on Firefox addons

I have an addon, which is pretty big, and I need to understand some things... What causes memory leak on a Firefox addon? How can I find what is causing the leak? How can I fix the leak? The addon adds some elements on the page, request parts of the page and update the DOM. The memory increases each time I reload the page, and the me...