firefox-addon

C++ writing HTML onto each of two already opened Firefox tabs from within extension

I'm seeking C++ help in writing HTML code to a new tab in Firefox within an extension. Our C++ code has been partially wrapped by an XPCOM wrapper and embedded within a Firefox extension thanks to the work of a consultant we have lost contact with, and still partially implemented by calling out to a standalone executable. To get our ou...

How to request to by the Firefox adding on

I am troubled without understanding the method of the outside request by the Firefox adding on. Thanking you in advance. ...

Wrap jQuery function

Hello all, I'm developing a Firefox addon, after nominating the addon for public release in Firefox addons site, the reviewer asked me to wrap all my function inside a namespace or package name. So far I've wrapped all my functions except "jQuery" function: myaddonname = { initialize: function() { var prefManager = Components...

Set an object in a page's window object from a Firefox extension?

I want my Firefox extension to add an object to the content window of the browsed page. I want it to have the same effect as running: top.myobj = {val : 3}; inside a script element in the page. Any ideas? I don't think there is a security risk here as I only add an object with a single integer property. Is there a simple way to get ...

How to embed audio file in HTML if it's being sent as octet-stream?

I'm trying to write a Greasemonkey script that will convert all "Play" links on a page to embedded audio (using the <embed> tag). When I use a link that I get from a GMail attachment, it works like a charm. When I use a link from another site (Digium Switchvox), the HTTP response header has ContentType set to "application/octet-stream"...

How can another Firefox extension mark a site as "trusted" in NoScript?

Hello, I am looking to write an extension that will integrate with the Web of Trust API to mark sites with good reputation as trusted automatically. However, from what I can understand, there is no easy way to integrate with NoScript. What I would need to do is check if a site is on the trusted or untrusted list, and add it to the trus...

Firefox Extension - Need a specific div to ignore xhtml errors (mismatched tag, etc).

Hello, My firefox extension loads content from a 3rd party site into an overlay panel. This content is user generated and sometimes will, for instance, have an image tag that does not close which causes a mismatched tag error to be thrown and the extension fails. Is there any way I can sandbox this content so that these kind of errors a...

How do you begin building a firefox addon that alters/replaces the default download feature?

I want to write a firefox addon that replaces my current default download feature. I basically just want to add other options to the download window that will allow it to interact with my website. Where do I get started with this? Does anyone know any code I can get started from? I'd rather not build the entire download from scratch, i...

Feedly is based on what ajax framework?

Feedly.com is kind of cool. Can you guys give me some clues about it is developed based on what ajax framework? ...

How to call bat file present inside firefox extension content directory ..

I have a bat file which needs to be called from javascript in firefox extension .. I have bat file present in content/chrome directory.. I tried to call bat file like this .. var exe = Components.classes['@mozilla.org/file/local;1'] .createInstance(Components.interfaces.nsILocalFile); exe.initWithPath("chrome://sample/co...

Vimperator/Conkeror-like link selection

I use Conkeror on a daily basis except at work where I need Firebug, since I'm a web developer. I really miss having the "follow link" ability in Conkeror but I don't want to resort to using Vimperator to get it. Is there any Firefox extension which lets me follow links by hitting a key followed by the link text like in Conkeror? ...

Get last visited site in another window using Javascript

I am creating a Firefox extension where I need to find out what was the last location visited in another window. Here is an example of what I mean. I present the user with a list of sites from a main interface window. The user clicks on one of the sites and a new window is opened to that site. From there, the user will navigate the si...

Remote site, local file redirection

As a followup on this answer: Specified javascript does work in case of a local website, but fails in case of a remote site. The firefox extension locallink helps in case of links, but is useless in case of the javascript solution provided by the linked answer. Please provide possible workarounds for redirecting to local files (unc) in ...

How to access webpage data from a firefox extension?

I have managed to get a custom very basic extension running in Firefox. What I want to do next is: Check if the user is on a desired webpage If yes: check the page on each postback for a hidden element containing a string If found: launch an external app with string parameter I have some experience with javascript on webpages, but ...

Firefox crashes when XPCOM function called from thread

I want to create a thread from XPCOM Component ... Here is a code for that nsresult rv = NS_OK; nsCOMPtr<Callback> obj = do_CreateInstance("@jscallback.p2psearch.com/f2f;1", &rv); NS_ENSURE_SUCCESS(rv, rv); char* str="Hello from C++"; obj->Status(str); _beginthread( (void(*)(void* ))&(P2P::test), 0,obj); return...

How to filter out asynchronous requests in ProgressListener?

I am using progresslistener to monitor user actions on web pages, when user click a link, I am trying to check if this request will redirect user to the new location or it is an Ajax WebHttpRequest only (It won't reload or redirect the page). here is the code I am using: ProgressListener.prototype = { QueryInterface: function(aIID) {...

Firefox extension to display a HTML page in a popup menu.

Within our team we have a small shared page on a web server which contains links to all our deployed web apps. It would be great if I could have this page popup from a firefox menu button, like a popup menu. I realize I could code up my own Firefox plugin, but out of laziness, I was wondering if there was an already existing plugin, wh...

Detecting when a page has finished loading in a firefox plugin.

I'm writing a firefox extension and as part of this extension I need to know when the page has fully loaded (including all images and flash etc). Does anyone know of an event that is triggered when the page has fully loaded? I'm thinking it would be the same event that controls the activity icon in the top right. If anyone knows what eve...

Reading web-page cookies from a Firefox extension (XUL)

Hi, I'm creating an extension for the Firefox browser. I would like to read a cookie which was set by an HTML page using JavaScript in the XUL file. Is it possible? I tried using document.cookie, but it doesn't work: function readCookie(name) { var ca = document.cookie.split(';'); var nameEQ = name + "="; for(var i=0; i < ca.len...

How to close thread when firefox closes

Hello, I have a extension that uses multithreading using worker thread as shown here . Whenever worker thread returns value to main thread, I am updating UI and I am starting that thread again because I want to continuously execute that operation. I cannot use setInterval because inside thread is a call to C++ XPCOM component function w...