firefox-addon

What IPC method should I use between Firefox extension and C# code running on the same machine?

I have a question about how to structure communication between a (new) Firefox extension and existing C# code. The firefox extension will use configuration data and will produce other data, so needs to get the config data from somewhere and save it's output somewhere. The data is produced/consumed by existing C# code, so I need to deci...

I try to add a new button to Firefox, but it's the old button that gets added!

Once, I tried adding a button with "bookmark-item pagerank" as class to PersonalToolbar. Now, the code... function createToolbarButton() { const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; var anitem = document.createElementNS(XUL_NS, "toolbarbutton"); anitem.setAttribute("id", "Testing-Doit-But...

Accessing an iFrame's dom from a Firefox Extension

Hi all, I've spent a long time trying different things to get this to work but nothing does and documentation is not helping much. I'm trying to populate a form inside an iframe that I dynamically inject into a page. To inject that iframe I do: myObject.iframe = document.createElement("iframe"); myObject.iframe.setAttribute("src", dat...

Removing Firefox Addon prefs when a user uninstalls

Hi there, I'm working on a firefox addon and one thing i'm unsure on is how to remove user preferences related to my addon when the user uninstalls it. The preferences get set, and if the user uninstalls and reinstalls the preferences are all still there. Some settings also relate to a first time install, so that breaks if the user has ...

Extract part of an url using a bookmarklet or similar (e.g. firefox addon)

Does anybody know of a bookmarklet or firefox addon that let's you extract part of an url. Specifically I want to extract the message id from a gmail conversation. Every message in gmail has a unique ID. The url may look like this: https://mail.google.com/a/domain.com/#all/1251b8f40722a3c2 What I want, is to be able to extract the last...

How to create a Firefox add-on using Objective-C on Mac OS X?

More precisely my goal is to create an add-on (or plug-in?) which is able to communicate with my main Cocoa application using something like the NSDistributedNotificationCenter. I need to be able to inject JavaScript code into the current webpage and get return values from the JS calls when my add-on receives the request to do so by my m...

Is there an add-on to view the CURRENT source of an HTML page after AJAX components have been triggered?

In Firefox (Windows) when you view source from the browser it will not update the source on a page if certain AJAX components have changed. An example is you navigate to the page and it fully loads. An AJAX component triggers and changes the source, but if you click view source after this event it will not register. If you download the...

Geolocation provider for Firefox that allows manual input

Are there any easy ways to override the default behaviors of the geolocation api and just hard code your current location? I think this would be useful for testing and for privacy reasons (providing fake location data) I thought there was an add on for this but I can't seem to find one. Only option right now seems to be changing the a...

components.Classes["THISPART"]

When you need to create or access well-known objects in XPCOM, where do you find their contract IDs? ...

Building IntelliSense/AutoComplete in JavaScript

I currently maintain an add-on for Firefox that adds a number of capabilities to a forum web site that implements its own markup language, similar to what stackoverflow provides with "Markdown." I have built an IntelliSense function for this add-on, which, similar to Visual Studio, will pop up an auto-suggest when typing this markup in ...

While trying to download a page, why doesn't this code alert test?

I have to download myURLString (http://www.google.com/search?q=http%3A//www.google.com/&btnG=Search+Directory&hl=en&cat=gwd%2FTop). function getcontents(myURLString) { var gChannel; var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService); var uri = ioService.n...

Firefox and QA Testing tools?

Can anyone suggest good testing tools/plugins for use with Firefox? Currently I use firebug and SQLInjector. Are there any others that people enjoy using for QA testing of web based systems? I know selenium, but we don't currently use it. ...

Accessing the same variable in multiple parts of a Firefox extension

In the Firefox extension I'm writing, I have a variable containing some data that I want to be able to access in both the actual extension and in the preferences pane of the extension. When Firefox is loaded, my extension code initializes the variable with the correct data. But, when I bring up my options dialog (which is contained in ...

JQuery selector builder?

I was wondering if such a tool exists in a browser. You select any item on the page like a <p> tag nested in several div's and the tool creates a JQuery selector for it which I can copy and use in my Javascript function. ...

How to get jQuery UI to work from a Firefox extension

Hi, I've tried to engage with the jquery and jquery ui communities (email list, irc), in addition to Google and more experienced coworkers, but nothing has proved fruitful. I've found stackoverflow useful in the past, so perhaps someone will have encountered this before. My problem is this: I want to include jQuery UI in my extension. ...

Intercepting and replacing page-level HTTP requests with custom extension-made responses?

I am making a firefox extension which injects most of its interface in the pages. However, if I want images in that interface, I am unable to inject them. So what I am trying is to intercept specific http requests and replace them with the local images. So far I have been able to intercept specific pages and replace them with others, but...

Preventing two conflicting Firefox extensions from being installed at the same time.

I built two separate Firefox extensions which are fundamentally incompatible with each other. The incompatibility is by design, as it would be totally unlogical for a user to install both. While I can stress out in the doc that both shouldn't be used at the same time, I don't trust the user to read the doc, and I'm looking for a way that...

Can firefox restore a secure session after an add-on installation?

When installing an add-on from a secure website (https) firefox installs the add on normally and requests the user to restart the browser. When the user clicks restart, the secure session is lost and they are forced to log in again. Is it possible to restore the secure session by simply retaining the secure session cookies in the case of...

Firing contextmenu event in Firefox AddOn gives different Elements (XPCNativeWrapper vs. XULElement)?!

Hi folks! Executing this JavaScript: window.addEventListener("contextmenu", function(e) { afunction(e); }, true); function updateReflectMenu(anEvent) { var elemUnderMouse = anEvent.target; alert(elemUnderMouse); } within an AddOn in FF3.5 gives me something like: [object XPCNativeWrapper [object HTMLSpanElement]] Exactly what I...

Developing a Firefox extension for Google Calender

Hi, I am actually not so sure if it is possible but It would be great for me to have a firefox add-on to add/remove/edit/delete for google calender. Is there any blog entry or a reference documents about this ? Thanks in advance ...